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

Implemented Integrity::from_hash(), inverse of Integrity::to_hash() #11

Merged
merged 3 commits into from
Jul 18, 2023
Merged

Implemented Integrity::from_hash(), inverse of Integrity::to_hash() #11

merged 3 commits into from
Jul 18, 2023

Conversation

nouritsu
Copy link
Contributor

Includes doc-comment, doc-test and from_hash() test in mod tests.
Fixes #10

src/integrity.rs Outdated Show resolved Hide resolved
@nouritsu
Copy link
Contributor Author

Implemented returning Result<Integrity, Error>

@nouritsu
Copy link
Contributor Author

@zkat I think this is ready to merge.

Copy link
Owner

@zkat zkat left a comment

Choose a reason for hiding this comment

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

Should use the actual error from hex

src/errors.rs Show resolved Hide resolved
src/errors.rs Show resolved Hide resolved
src/integrity.rs Outdated Show resolved Hide resolved
@nouritsu
Copy link
Contributor Author

I'll make the changes and commit. My bad I'm extremely new to error handling 😅

@nouritsu
Copy link
Contributor Author

Unfortunately hex::FromError does not implement Eq. Which leads to the following error -
image
Issue for implementing Eq seems to be open here.

@zkat
Copy link
Owner

zkat commented Jul 18, 2023

SIGH. Yeah, it can't be helped. Just keep it as String, I guess :\

@zkat zkat merged commit 991628e into zkat:latest Jul 18, 2023
6 checks passed
zkat pushed a commit that referenced this pull request Jul 18, 2023
@zkat
Copy link
Owner

zkat commented Jul 18, 2023

This has been released as part of [email protected] on crates.io. Thanks for the patch!

@nouritsu
Copy link
Contributor Author

nouritsu commented Aug 3, 2023

I've created a PR to add Eq to FromHexError. If it gets merged, I will make another PR to this repository to make the error type wrap FromHexError rather than a String

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.

need ssi::from_hex()
2 participants