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

Adapt StorageError to be more generic #1144

Merged
merged 7 commits into from
Mar 15, 2023
Merged

Conversation

olivereanderson
Copy link
Contributor

@olivereanderson olivereanderson commented Mar 14, 2023

Description of change

This PR renames and moves StorageError to identity_core so that it may be used in more contexts where the single struct error design pattern is desirable. A first example of this is the additional use in SignatureVerificationError in identity_jose.

Also uses Debug + Display as trait bounds directly on the error kind and removes the ErrorKind trait in order to reuse existing traits and not introduce too many new traits.

Type of change

  • Bug fix (a non-breaking change which fixes an issue)
  • Enhancement (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Fix

How the change has been tested

Runs under cargo test locally and the bindings build without problems.

Change checklist

Add an x to the boxes that are relevant to your changes.

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@olivereanderson olivereanderson changed the title Adapted StorageError to be more generic Adapt StorageError to be more generic Mar 14, 2023
@olivereanderson olivereanderson self-assigned this Mar 14, 2023
@olivereanderson olivereanderson added Breaking change A change to the API that requires a major release. Part of "Changed" section in changelog Rust Related to the core Rust code. Becomes part of the Rust changelog. labels Mar 14, 2023
@olivereanderson olivereanderson added this to the v0.7 Features milestone Mar 14, 2023
@olivereanderson olivereanderson marked this pull request as ready for review March 15, 2023 10:37
identity_core/src/common/single_struct_error.rs Outdated Show resolved Hide resolved
identity_core/src/common/single_struct_error.rs Outdated Show resolved Hide resolved
identity_core/src/common/single_struct_error.rs Outdated Show resolved Hide resolved
@olivereanderson olivereanderson merged commit cff4213 into main Mar 15, 2023
@olivereanderson olivereanderson deleted the chore/single-struct-error branch March 15, 2023 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking change A change to the API that requires a major release. Part of "Changed" section in changelog Rust Related to the core Rust code. Becomes part of the Rust changelog.
Projects
Development

Successfully merging this pull request may close these issues.

2 participants