Skip to content

Commit

Permalink
spki: borrow the public key in spki::from_key (#1290)
Browse files Browse the repository at this point in the history
`SubjectPublicKeyInfoOwned` does not require the ownership of the key.

This is a breaking change.
  • Loading branch information
baloo authored Jan 4, 2024
1 parent 9b65d8b commit a40e97b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spki/src/spki.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ mod allocating {
impl SubjectPublicKeyInfoOwned {
/// Create a [`SubjectPublicKeyInfoOwned`] from any object that implements
/// [`EncodePublicKey`].
pub fn from_key<T>(source: T) -> Result<Self>
pub fn from_key<T>(source: &T) -> Result<Self>
where
T: EncodePublicKey,
{
Expand Down

0 comments on commit a40e97b

Please sign in to comment.