Add missing_const_for_fn clippy lint (#8498)

This commit is contained in:
Thomas Coratger
2024-05-30 11:50:03 +02:00
committed by GitHub
parent 99068198db
commit 3d3f52b2a4
255 changed files with 834 additions and 804 deletions

View File

@ -149,12 +149,12 @@ impl BlockExecutionError {
/// Returns `true` if the error is fatal.
///
/// This represents an unrecoverable database related error.
pub fn is_fatal(&self) -> bool {
pub const fn is_fatal(&self) -> bool {
matches!(self, Self::CanonicalCommit { .. } | Self::CanonicalRevert { .. })
}
/// Returns `true` if the error is a state root error.
pub fn is_state_root_error(&self) -> bool {
pub const fn is_state_root_error(&self) -> bool {
matches!(self, Self::Validation(BlockValidationError::StateRoot(_)))
}
}