-
Notifications
You must be signed in to change notification settings - Fork 52
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
Implement TryInto<PublicEncryptingKey> for PublicKeyComponents #582
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #582 +/- ##
==========================================
- Coverage 95.80% 92.71% -3.09%
==========================================
Files 61 67 +6
Lines 8143 9772 +1629
Branches 0 9772 +9772
==========================================
+ Hits 7801 9060 +1259
- Misses 342 426 +84
- Partials 0 286 +286 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
@@ -456,6 +457,22 @@ where | |||
} | |||
} | |||
|
|||
impl<B> TryInto<PublicEncryptingKey> for PublicKeyComponents<B> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure it's needed, but we could potentially have a non-consuming implementation:
impl<B> TryInto<PublicEncryptingKey> for &PublicKeyComponents<B>
...
Its use would be more cumbersome: TryInto::try_into(&public_key)?
or (&public_key).try_into()?
.
Issues:
Resolves #581
Description of changes:
Adds
impl TryInto<PublicEncryptingKey> for PublicKeyComponents
.Call-outs:
N/A
Testing:
Im not sure how to implement unit tests for this change would need a reviewer to assist with this. I tested them in my personal application and they functioned as expected.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.