add use_self clippy lint (#8325)

This commit is contained in:
Thomas Coratger
2024-05-29 15:14:14 +02:00
committed by GitHub
parent 0cb5358fef
commit 19c529e8df
200 changed files with 1817 additions and 1954 deletions

View File

@ -46,24 +46,24 @@ impl RethError {
where
E: std::error::Error + Send + Sync + 'static,
{
RethError::Other(Box::new(error))
Self::Other(Box::new(error))
}
/// Create a new `RethError` from a given message.
pub fn msg(msg: impl Display) -> Self {
RethError::Other(msg.to_string().into())
Self::Other(msg.to_string().into())
}
}
impl From<BlockchainTreeError> for RethError {
fn from(error: BlockchainTreeError) -> Self {
RethError::Canonical(CanonicalError::BlockchainTree(error))
Self::Canonical(CanonicalError::BlockchainTree(error))
}
}
impl From<FsPathError> for RethError {
fn from(err: FsPathError) -> Self {
RethError::other(err)
Self::other(err)
}
}