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

[uniffi] Remove GroupState type from storage trait #128

Merged
merged 1 commit into from
Mar 21, 2024

Conversation

mgeisler
Copy link
Contributor

Issues:

Addresses #81

Description of changes:

This removes the GroupState type from the GroupStateStorage trait in mls-rs-uniffi. This is done for two reasons:

  • It makes all methods on the trait consistent in the way that they take a group_id as the first argument.

  • Fewer types means less boiler-plate generated by the UniFFI bindings generator (Vec<u8> is a built-in type in UniFFI).

Call-outs:

The EpochRecord type stays: I don’t think we have a different way of passing in a vector of epochs IDs with their data.

I could apply this change to mls-rs too, but it doesn’t seem useful there since it’s cheap and easy to create a new type in Rust.

Testing:

Updated tests.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT license.

This removes the `GroupState` type from the `GroupStateStorage` trait
in mls-rs-uniffi. This is done for two reasons:

- It makes all methods on the trait consistent in the way that they
  take a `group_id` as the first argument.

- Fewer types means less boiler-plate generated by the UniFFI bindings
  generator (`Vec<u8>` is a built-in type in UniFFI).

The `EpochRecord` type stays: I don’t think we have a different way of
passing in a vector of epochs IDs with their data.

I could apply this change to mls-rs too, but it doesn’t seem useful
there since it’s cheap and easy to create a new type in Rust.
@mgeisler mgeisler requested a review from a team as a code owner March 20, 2024 15:53
@mgeisler
Copy link
Contributor Author

I don't think this is super important for us, it was just something that came up when Anh was looking at the storage trait.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.49%. Comparing base (e4009f9) to head (ebb0493).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #128      +/-   ##
==========================================
- Coverage   89.49%   89.49%   -0.01%     
==========================================
  Files         173      173              
  Lines       31407    31404       -3     
==========================================
- Hits        28109    28106       -3     
  Misses       3298     3298              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tomleavy tomleavy merged commit 5b83cac into awslabs:main Mar 21, 2024
12 checks passed
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.

4 participants