From a40e97b8e97ce1f548da46dbb36796a99723ea2b Mon Sep 17 00:00:00 2001 From: Arthur Gautier Date: Thu, 4 Jan 2024 20:37:31 +0000 Subject: [PATCH] spki: borrow the public key in `spki::from_key` (#1290) `SubjectPublicKeyInfoOwned` does not require the ownership of the key. This is a breaking change. --- spki/src/spki.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spki/src/spki.rs b/spki/src/spki.rs index b7e4c9280..192b726a3 100644 --- a/spki/src/spki.rs +++ b/spki/src/spki.rs @@ -207,7 +207,7 @@ mod allocating { impl SubjectPublicKeyInfoOwned { /// Create a [`SubjectPublicKeyInfoOwned`] from any object that implements /// [`EncodePublicKey`]. - pub fn from_key(source: T) -> Result + pub fn from_key(source: &T) -> Result where T: EncodePublicKey, {