mirror of
https://github.com/element-hq/matrix-authentication-service.git
synced 2026-10-23 15:13:37 +00:00
Avoid some unncessary clones
This commit is contained in:
1 parent
84b0d97b18
commit
2b730e448b
1 file changed
+3
-3
@@ -476,15 +476,15 @@ impl PrivateKey {
|
||||
}
|
||||
|
||||
(Self::EcP256(key), JsonWebSignatureAlg::Es256) => {
|
||||
mas_jose::jwa::Es256SigningKey::from(*key.clone()).into()
|
||||
mas_jose::jwa::Es256SigningKey::from(key.as_ref()).into()
|
||||
}
|
||||
|
||||
(Self::EcP384(key), JsonWebSignatureAlg::Es384) => {
|
||||
mas_jose::jwa::Es384SigningKey::from(*key.clone()).into()
|
||||
mas_jose::jwa::Es384SigningKey::from(key.as_ref()).into()
|
||||
}
|
||||
|
||||
(Self::EcK256(key), JsonWebSignatureAlg::Es256K) => {
|
||||
mas_jose::jwa::Es256KSigningKey::from(*key.clone()).into()
|
||||
mas_jose::jwa::Es256KSigningKey::from(key.as_ref()).into()
|
||||
}
|
||||
|
||||
_ => return Err(WrongAlgorithmError),
|
||||
|
||||
Reference in new issue
Block a user