sycret icon indicating copy to clipboard operation
sycret copied to clipboard

Convert `op_id` and `party_id` to enums

Open nph4rd opened this issue 3 years ago • 0 comments

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:

https://github.com/OpenMined/sycret/blob/fc776e1a9c517aebdd7a705d448eb1865cda6479/src/lib.rs#L14

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 avatar Sep 02 '21 16:09 nph4rd