Skip to content

Commit 49bd97c

Browse files
authored
fix lints (#304)
1 parent 3b45afa commit 49bd97c

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

crates/node/src/args.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -430,21 +430,16 @@ impl ConsensusArgs {
430430
}
431431

432432
/// The consensus algorithm to use.
433-
#[derive(Debug, clap::ValueEnum, Clone, PartialEq, Eq)]
433+
#[derive(Debug, Default, clap::ValueEnum, Clone, PartialEq, Eq)]
434434
pub enum ConsensusAlgorithm {
435435
/// System contract consensus with an optional authorized signer. If the authorized signer is
436436
/// not provided the system will use the L1 provider to query the authorized signer from L1.
437+
#[default]
437438
SystemContract,
438439
/// No-op consensus that does not validate blocks.
439440
Noop,
440441
}
441442

442-
impl Default for ConsensusAlgorithm {
443-
fn default() -> Self {
444-
Self::SystemContract
445-
}
446-
}
447-
448443
/// The engine driver args.
449444
#[derive(Debug, Clone, clap::Args)]
450445
pub struct EngineDriverArgs {

crates/sequencer/src/lib.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,15 @@ pub type PayloadBuildingJobFuture =
3030
Pin<Box<dyn Future<Output = Result<ScrollPayloadAttributes, SequencerError>> + Send>>;
3131

3232
/// Configuration for L1 message inclusion strategy.
33-
#[derive(Debug, Clone, Copy)]
33+
#[derive(Debug, Default, Clone, Copy)]
3434
pub enum L1MessageInclusionMode {
3535
/// Include L1 messages based on block depth.
3636
BlockDepth(u64),
3737
/// Include only finalized L1 messages.
38+
#[default]
3839
Finalized,
3940
}
4041

41-
impl Default for L1MessageInclusionMode {
42-
fn default() -> Self {
43-
Self::Finalized
44-
}
45-
}
46-
4742
impl FromStr for L1MessageInclusionMode {
4843
type Err = String;
4944

0 commit comments

Comments
 (0)