Skip to content

Commit

Permalink
Fix defaul impl for Topic
Browse files Browse the repository at this point in the history
  • Loading branch information
jordy25519 committed Apr 13, 2023
1 parent fa299d8 commit dedc17e
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions ethabi/src/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ impl Serialize for TopicFilter {
}

/// Acceptable topic possibilities.
#[derive(Debug, PartialEq, Eq)]
#[derive(Debug, Default, PartialEq, Eq)]
pub enum Topic<T> {
/// Match any.
#[default]
Any,
/// Match any of the hashes.
OneOf(Vec<T>),
Expand Down Expand Up @@ -82,12 +83,6 @@ impl<T> Topic<T> {
}
}

impl<T> Default for Topic<T> {
fn default() -> Self {
Topic::Any
}
}

impl<T> From<Option<T>> for Topic<T> {
fn from(o: Option<T>) -> Self {
match o {
Expand Down

0 comments on commit dedc17e

Please sign in to comment.