Skip to content

Commit

Permalink
make type alias for complicated type
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanoroshiba committed Dec 10, 2024
1 parent d113119 commit 7ef3361
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions crates/astria-sequencer-relayer/src/relayer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ use crate::{
IncludeRollup,
};

type ForwardFut<'a> =
Fuse<BoxFuture<'a, Result<(), tokio::sync::mpsc::error::SendError<Box<SequencerBlock>>>>>;

pub(crate) struct Relayer {
/// A token to notify relayer that it should shut down.
#[expect(
Expand Down Expand Up @@ -276,20 +279,13 @@ impl Relayer {
}

#[instrument(skip_all, fields(%height))]
#[expect(
clippy::type_complexity,
reason = "complexity comes from the error type, which is boxed to avoid a large Err \
variant of the result"
)]
fn forward_block_for_submission(
&self,
height: SequencerHeight,
block: SequencerBlock,
block_stream: &mut read::BlockStream,
submitter: write::BlobSubmitterHandle,
forward: &mut Fuse<
BoxFuture<Result<(), tokio::sync::mpsc::error::SendError<Box<SequencerBlock>>>>,
>,
forward: &mut ForwardFut,
) -> eyre::Result<()> {
assert!(
forward.is_terminated(),
Expand Down

0 comments on commit 7ef3361

Please sign in to comment.