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

refactor: Remove unused constraints #17

Merged
merged 4 commits into from Mar 27, 2024
Merged

refactor: Remove unused constraints #17

merged 4 commits into from Mar 27, 2024

Conversation

matheus23
Copy link
Member

@matheus23 matheus23 commented Mar 26, 2024

Removes some unused constraints from type signatures:

  • the ability type doesn't need Deserialize in Deserialize for Payload, because it actually uses ParseAbility::try_parse to parse, so ParseAbility is enough.
  • Codec + TryFrom<u64> + Into<u64> is as good as Codec, because it's defined as trait Codec: [...] TryFrom<u64, Error = UnsupportedCodec> + Into<u64>.
  • there was an unused <S as delegation::store::Store<...>>::DelegationStoreError: Debug constraint (it's part of the trait)
  • I took the freedom to also make type InvocationStoreError: Debug in the invocation store, similar to the delegation store, and removed the constraints used elsewhere.

@matheus23 matheus23 self-assigned this Mar 26, 2024
Copy link

codecov bot commented Mar 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 13.09%. Comparing base (5dbd296) to head (88ce308).

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff               @@
##           v1.0-rc.1      #17       +/-   ##
==============================================
+ Coverage           0   13.09%   +13.09%     
==============================================
  Files              0       68       +68     
  Lines              0     5652     +5652     
  Branches           0     2709     +2709     
==============================================
+ Hits               0      740      +740     
- Misses             0     4316     +4316     
- Partials           0      596      +596     
Files Coverage Δ
src/crypto/signature/envelope.rs 34.21% <ø> (ø)
src/crypto/varsig/header/eddsa.rs 15.38% <ø> (ø)
src/crypto/varsig/header/es256.rs 0.00% <ø> (ø)
src/crypto/varsig/header/es256k.rs 0.00% <ø> (ø)
src/crypto/varsig/header/es512.rs 0.00% <ø> (ø)
src/crypto/varsig/header/rs256.rs 0.00% <ø> (ø)
src/crypto/varsig/header/rs512.rs 0.00% <ø> (ø)
src/delegation.rs 100.00% <ø> (ø)
src/delegation/store/memory.rs 29.31% <ø> (ø)
src/delegation/store/traits.rs 60.00% <ø> (ø)
... and 5 more

... and 53 files with indirect coverage changes

Copy link
Member

@expede expede left a comment

Choose a reason for hiding this comment

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

Yeah, there's probably a bunch of this as stuff shifted around. Thanks!

@expede expede merged commit 7f680d3 into v1.0-rc.1 Mar 27, 2024
7 of 11 checks passed
@expede expede deleted the matheus23/v1.0-3 branch March 27, 2024 16:44
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.

None yet

2 participants