Skip to content

Commit

Permalink
Update LogError varant name
Browse files Browse the repository at this point in the history
  • Loading branch information
leruaa committed Nov 29, 2023
1 parent e1d2064 commit a02dd94
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/rpc-types/src/eth/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ impl TryFrom<Log> for alloy_primitives::Log {
type Error = LogError;

fn try_from(value: Log) -> Result<Self, Self::Error> {
alloy_primitives::Log::new(value.topics, value.data).ok_or(LogError::InvalidTopics)
alloy_primitives::Log::new(value.topics, value.data).ok_or(LogError::TooManyTopics)
}
}

/// Error that can occur when converting other types to logs
#[derive(Debug, thiserror::Error)]
pub enum LogError {
/// The topics are invalid
#[error("invalid topics")]
InvalidTopics,
/// There are too many topics
#[error("too many topics")]
TooManyTopics,
}

#[cfg(test)]
Expand Down

0 comments on commit a02dd94

Please sign in to comment.