Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(conductor): avoid large enum variants #1858

Open
ethanoroshiba opened this issue Dec 6, 2024 · 0 comments · May be fixed by #1865
Open

chore(conductor): avoid large enum variants #1858

ethanoroshiba opened this issue Dec 6, 2024 · 0 comments · May be fixed by #1865
Assignees
Labels
code-quality conductor pertaining to the astria-conductor crate

Comments

@ethanoroshiba
Copy link
Contributor

ethanoroshiba commented Dec 6, 2024

We should void having large enum variants as described here: https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant

Problem point:

#[derive(Debug, thiserror::Error)]
pub(crate) enum FirmSendError {
#[error("executor was configured without firm commitments")]
NotSet,
#[error("failed sending blocks to executor")]
Channel {
#[from]
source: mpsc::error::SendError<ReconstructedBlock>,
},
}
#[derive(Debug, thiserror::Error)]
pub(crate) enum FirmTrySendError {
#[error("executor was configured without firm commitments")]
NotSet,
#[error("failed sending blocks to executor")]
Channel {
#[from]
source: mpsc::error::TrySendError<ReconstructedBlock>,
},
}

┆Issue Number: ENG-1039

@ethanoroshiba ethanoroshiba self-assigned this Dec 6, 2024
@ethanoroshiba ethanoroshiba added conductor pertaining to the astria-conductor crate code-quality labels Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-quality conductor pertaining to the astria-conductor crate
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant