Skip to content
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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

ConjunctiveNormalForm
Copy link
Member

No description provided.

Comment on lines +23 to +26
impl From<DimensionName> for String {
fn from(dimension: DimensionName) -> Self {
match dimension {
DimensionName::Executor => EXECUTOR_DIMENSION.to_string(),
Copy link
Member Author

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 {
Copy link
Member Author

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 {
Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant