Skip to content

Commit a40e97b

Browse files
authored
spki: borrow the public key in spki::from_key (#1290)
`SubjectPublicKeyInfoOwned` does not require the ownership of the key. This is a breaking change.
1 parent 9b65d8b commit a40e97b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spki/src/spki.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ mod allocating {
207207
impl SubjectPublicKeyInfoOwned {
208208
/// Create a [`SubjectPublicKeyInfoOwned`] from any object that implements
209209
/// [`EncodePublicKey`].
210-
pub fn from_key<T>(source: T) -> Result<Self>
210+
pub fn from_key<T>(source: &T) -> Result<Self>
211211
where
212212
T: EncodePublicKey,
213213
{

0 commit comments

Comments
 (0)