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

Convert op_id and party_id to enums #33

Open
nph4rd opened this issue Sep 2, 2021 · 0 comments
Open

Convert op_id and party_id to enums #33

nph4rd opened this issue Sep 2, 2021 · 0 comments
Assignees
Labels
Type: Improvement 📈 Performance improvement not introducing a new feature or requiring a major refactor

Comments

@nph4rd
Copy link
Member

nph4rd commented Sep 2, 2021

Description

Currently, we're working with op_id and party_id as a usize variables, and then we use these variables to "match" values, for example, like the following:

let (keylen, n_aes_keys) = match op_id {

I think we could maybe use an enum instead. For example, in the case of op_id:

enum OpId {
    Eq,
    Le,
}

This would be more idiomatic for Rust and could help us prevent errors my limiting options to the enum variants.

Are you interested in working on this improvement yourself?

Yes.

@nph4rd nph4rd added the Type: Improvement 📈 Performance improvement not introducing a new feature or requiring a major refactor label Sep 2, 2021
@nph4rd nph4rd self-assigned this Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Improvement 📈 Performance improvement not introducing a new feature or requiring a major refactor
Projects
None yet
Development

No branches or pull requests

1 participant