From 55d9cc30c604b6e1258b899b79394d9c6fd6d730 Mon Sep 17 00:00:00 2001 From: clabby Date: Fri, 18 Oct 2024 19:37:37 -0400 Subject: [PATCH] lint --- crates/derive/src/stages/batch/batch_validator.rs | 4 ++-- crates/derive/src/stages/batch/mod.rs | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/derive/src/stages/batch/batch_validator.rs b/crates/derive/src/stages/batch/batch_validator.rs index 82d5813ce..49ae79e5d 100644 --- a/crates/derive/src/stages/batch/batch_validator.rs +++ b/crates/derive/src/stages/batch/batch_validator.rs @@ -46,7 +46,7 @@ where P: NextBatchProvider + OriginAdvancer + OriginProvider + SignalReceiver + Debug, { /// Create a new [BatchValidator] stage. - pub fn new(cfg: Arc, prev: P) -> Self { + pub const fn new(cfg: Arc, prev: P) -> Self { Self { cfg, prev, origin: None, l1_blocks: Vec::new() } } @@ -485,7 +485,7 @@ mod test { async fn test_batch_validator_origin_behind_drain_prev() { let cfg = Arc::new(RollupConfig::default()); let mut mock = TestBatchQueueProvider::new( - (0..5).into_iter().map(|_| Ok(Batch::Single(SingleBatch::default()))).collect(), + (0..5).map(|_| Ok(Batch::Single(SingleBatch::default()))).collect(), ); mock.origin = Some(BlockInfo::default()); let mut bv = BatchValidator::new(cfg, mock); diff --git a/crates/derive/src/stages/batch/mod.rs b/crates/derive/src/stages/batch/mod.rs index 6743d9563..f6e7a01ba 100644 --- a/crates/derive/src/stages/batch/mod.rs +++ b/crates/derive/src/stages/batch/mod.rs @@ -34,6 +34,7 @@ pub trait NextBatchProvider { /// complete and the batch has been consumed, an [PipelineError::Eof] error is returned. /// /// [ChannelReader]: crate::stages::ChannelReader + /// [PipelineError::Eof]: crate::errors::PipelineError::Eof async fn next_batch( &mut self, parent: L2BlockInfo,