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

Add an error type to the CryptoStore trait #1477

Merged
merged 3 commits into from
Feb 13, 2023
Merged

Conversation

jplatte
Copy link
Collaborator

@jplatte jplatte commented Feb 8, 2023

This makes store implementations cleaner at the expense of some boilerplate code in matrix-sdk-crypto.

@jplatte jplatte requested a review from poljar February 8, 2023 16:04
@codecov
Copy link

codecov bot commented Feb 8, 2023

Codecov Report

Base: 72.78% // Head: 72.67% // Decreases project coverage by -0.12% ⚠️

Coverage data is based on head (18626b0) compared to base (0f7646a).
Patch coverage: 56.62% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1477      +/-   ##
==========================================
- Coverage   72.78%   72.67%   -0.12%     
==========================================
  Files         124      125       +1     
  Lines       13321    13384      +63     
==========================================
+ Hits         9696     9727      +31     
- Misses       3625     3657      +32     
Impacted Files Coverage Δ
crates/matrix-sdk-base/src/client.rs 84.88% <ø> (ø)
crates/matrix-sdk-crypto/src/gossiping/machine.rs 62.46% <ø> (ø)
crates/matrix-sdk-crypto/src/identities/device.rs 73.83% <ø> (ø)
crates/matrix-sdk-crypto/src/identities/user.rs 72.41% <ø> (ø)
crates/matrix-sdk-crypto/src/machine.rs 75.72% <ø> (ø)
.../matrix-sdk-crypto/src/session_manager/sessions.rs 79.85% <ø> (ø)
crates/matrix-sdk-crypto/src/store/error.rs 0.00% <ø> (ø)
crates/matrix-sdk-crypto/src/store/memorystore.rs 85.56% <ø> (+0.27%) ⬆️
crates/matrix-sdk-crypto/src/store/mod.rs 66.26% <ø> (ø)
...ates/matrix-sdk-crypto/src/verification/machine.rs 74.09% <ø> (ø)
... and 17 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

This makes it easier to implement it. However, using a different error
type than CryptoStoreError is a non-trivial change, so left for the
coming commits for all stores except the memory store.
Copy link
Contributor

@poljar poljar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense.

@jplatte jplatte merged commit 3a516a5 into main Feb 13, 2023
@jplatte jplatte deleted the jplatte/store-refactor branch February 13, 2023 11:05
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.

2 participants