From bdf39e85c17fdc6a529605ce3cc2affc42271cf0 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 8 Jul 2024 20:55:59 +0900 Subject: [PATCH] v2.0: [zk-token-sdk] Specify version in deprecations in `zk-token-sdk` (backport of #2011) (#2014) --- zk-token-sdk/src/encryption/elgamal.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/zk-token-sdk/src/encryption/elgamal.rs b/zk-token-sdk/src/encryption/elgamal.rs index 7f0a48820a6f35..130aacef669545 100644 --- a/zk-token-sdk/src/encryption/elgamal.rs +++ b/zk-token-sdk/src/encryption/elgamal.rs @@ -221,7 +221,7 @@ impl ElGamalKeypair { &self.secret } - #[deprecated(note = "please use `into()` instead")] + #[deprecated(since = "2.0.0", note = "please use `into()` instead")] #[allow(deprecated)] pub fn to_bytes(&self) -> [u8; ELGAMAL_KEYPAIR_LEN] { let mut bytes = [0u8; ELGAMAL_KEYPAIR_LEN]; @@ -230,7 +230,7 @@ impl ElGamalKeypair { bytes } - #[deprecated(note = "please use `try_from()` instead")] + #[deprecated(since = "2.0.0", note = "please use `try_from()` instead")] #[allow(deprecated)] pub fn from_bytes(bytes: &[u8]) -> Option { if bytes.len() != ELGAMAL_KEYPAIR_LEN { @@ -367,12 +367,12 @@ impl ElGamalPubkey { &self.0 } - #[deprecated(note = "please use `into()` instead")] + #[deprecated(since = "2.0.0", note = "please use `into()` instead")] pub fn to_bytes(&self) -> [u8; ELGAMAL_PUBKEY_LEN] { self.0.compress().to_bytes() } - #[deprecated(note = "please use `try_from()` instead")] + #[deprecated(since = "2.0.0", note = "please use `try_from()` instead")] pub fn from_bytes(bytes: &[u8]) -> Option { if bytes.len() != ELGAMAL_PUBKEY_LEN { return None; @@ -544,12 +544,12 @@ impl ElGamalSecretKey { self.0.as_bytes() } - #[deprecated(note = "please use `into()` instead")] + #[deprecated(since = "2.0.0", note = "please use `into()` instead")] pub fn to_bytes(&self) -> [u8; ELGAMAL_SECRET_KEY_LEN] { self.0.to_bytes() } - #[deprecated(note = "please use `try_from()` instead")] + #[deprecated(since = "2.0.0", note = "please use `try_from()` instead")] pub fn from_bytes(bytes: &[u8]) -> Option { match bytes.try_into() { Ok(bytes) => Scalar::from_canonical_bytes(bytes).map(ElGamalSecretKey),