-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: skip reprocessing event if already seen; also bunch of small optimizations #20
base: main
Are you sure you want to change the base?
Conversation
impl From<DimensionName> for String { | ||
fn from(dimension: DimensionName) -> Self { | ||
match dimension { | ||
DimensionName::Executor => EXECUTOR_DIMENSION.to_string(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
impl From gives you Into for free, the reverse not true
@@ -44,21 +45,15 @@ impl FromStr for OrderType { | |||
} | |||
} | |||
|
|||
impl ToString for OrderType { | |||
fn to_string(&self) -> String { | |||
impl fmt::Display for OrderType { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
impl Display gives you ToString for free
@@ -95,6 +95,10 @@ impl KeyStore { | |||
pub fn len(&self) -> usize { | |||
self.keys.len() | |||
} | |||
|
|||
pub fn is_empty(&self) -> bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pub fn len()
and pub fn is_empty()
often go hand-in-hand to provide the same interface as std types
No description provided.