mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-19 13:58:28 +00:00
Rust clippy 1.87 lint fixes (#7471)
Fix clippy lints for `rustc` 1.87 clippy complains about `BeaconChainError` being too large. I went on a bit of a boxing spree because of this. We may instead want to `Box` some of the `BeaconChainError` variants?
This commit is contained in:
@@ -57,7 +57,7 @@ pub enum Error {
|
||||
#[cfg(feature = "leveldb")]
|
||||
LevelDbError(LevelDBError),
|
||||
#[cfg(feature = "redb")]
|
||||
RedbError(redb::Error),
|
||||
RedbError(Box<redb::Error>),
|
||||
CacheBuildError(EpochCacheError),
|
||||
RandaoMixOutOfBounds,
|
||||
MilhouseError(milhouse::Error),
|
||||
@@ -161,49 +161,49 @@ impl From<LevelDBError> for Error {
|
||||
#[cfg(feature = "redb")]
|
||||
impl From<redb::Error> for Error {
|
||||
fn from(e: redb::Error) -> Self {
|
||||
Error::RedbError(e)
|
||||
Error::RedbError(Box::new(e))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "redb")]
|
||||
impl From<redb::TableError> for Error {
|
||||
fn from(e: redb::TableError) -> Self {
|
||||
Error::RedbError(e.into())
|
||||
Error::RedbError(Box::new(e.into()))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "redb")]
|
||||
impl From<redb::TransactionError> for Error {
|
||||
fn from(e: redb::TransactionError) -> Self {
|
||||
Error::RedbError(e.into())
|
||||
Error::RedbError(Box::new(e.into()))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "redb")]
|
||||
impl From<redb::DatabaseError> for Error {
|
||||
fn from(e: redb::DatabaseError) -> Self {
|
||||
Error::RedbError(e.into())
|
||||
Error::RedbError(Box::new(e.into()))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "redb")]
|
||||
impl From<redb::StorageError> for Error {
|
||||
fn from(e: redb::StorageError) -> Self {
|
||||
Error::RedbError(e.into())
|
||||
Error::RedbError(Box::new(e.into()))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "redb")]
|
||||
impl From<redb::CommitError> for Error {
|
||||
fn from(e: redb::CommitError) -> Self {
|
||||
Error::RedbError(e.into())
|
||||
Error::RedbError(Box::new(e.into()))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "redb")]
|
||||
impl From<redb::CompactionError> for Error {
|
||||
fn from(e: redb::CompactionError) -> Self {
|
||||
Error::RedbError(e.into())
|
||||
Error::RedbError(Box::new(e.into()))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user