Skip to content

Commit 47ab5af

Browse files
committed
deprecations: replace all TBDs with 0.30.0
We accidentally released 0.30.0 and 0.31.0 with "in future" deprecations. Most users will not see these since the lint for them is different from the normal deprecation warning (and it's undocumented except to say that we "should not use" future deprecations, even though it works and there is no alternative).
1 parent 7758313 commit 47ab5af

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/ecdh.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ impl SharedSecret {
6464
pub fn from_bytes(bytes: [u8; SHARED_SECRET_SIZE]) -> SharedSecret { SharedSecret(bytes) }
6565

6666
/// Creates a shared secret from `bytes` slice.
67-
#[deprecated(since = "TBD", note = "Use `from_bytes` instead.")]
67+
#[deprecated(since = "0.30.0", note = "Use `from_bytes` instead.")]
6868
#[inline]
6969
pub fn from_slice(bytes: &[u8]) -> Result<SharedSecret, Error> {
7070
match bytes.len() {

src/key.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ impl SecretKey {
219219
/// use secp256k1::SecretKey;
220220
/// let sk = SecretKey::from_slice(&[0xcd; 32]).expect("32 bytes, within curve order");
221221
/// ```
222-
#[deprecated(since = "TBD", note = "Use `from_byte_array` instead.")]
222+
#[deprecated(since = "0.30.0", note = "Use `from_byte_array` instead.")]
223223
#[inline]
224224
pub fn from_slice(data: &[u8]) -> Result<SecretKey, Error> {
225225
match <[u8; constants::SECRET_KEY_SIZE]>::try_from(data) {
@@ -860,7 +860,7 @@ impl Keypair {
860860
///
861861
/// [`Error::InvalidSecretKey`] if the slice is not exactly 32 bytes long,
862862
/// or if the encoded number is an invalid scalar.
863-
#[deprecated(since = "TBD", note = "Use `from_seckey_byte_array` instead.")]
863+
#[deprecated(since = "0.31.0", note = "Use `from_seckey_byte_array` instead.")]
864864
#[inline]
865865
pub fn from_seckey_slice<C: Signing>(
866866
secp: &Secp256k1<C>,
@@ -1239,7 +1239,7 @@ impl XOnlyPublicKey {
12391239
///
12401240
/// Returns [`Error::InvalidPublicKey`] if the length of the data slice is not 32 bytes or the
12411241
/// slice does not represent a valid Secp256k1 point x coordinate.
1242-
#[deprecated(since = "TBD", note = "Use `from_byte_array` instead.")]
1242+
#[deprecated(since = "0.30.0", note = "Use `from_byte_array` instead.")]
12431243
#[inline]
12441244
pub fn from_slice(data: &[u8]) -> Result<XOnlyPublicKey, Error> {
12451245
match <[u8; constants::SCHNORR_PUBLIC_KEY_SIZE]>::try_from(data) {

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ impl Message {
255255
///
256256
/// [secure signature]: https://twitter.com/pwuille/status/1063582706288586752
257257
#[inline]
258-
#[deprecated(since = "TBD", note = "use from_digest instead")]
258+
#[deprecated(since = "0.30.0", note = "use from_digest instead")]
259259
pub fn from_digest_slice(digest: &[u8]) -> Result<Message, Error> {
260260
Ok(Message::from_digest(digest.try_into().map_err(|_| Error::InvalidMessage)?))
261261
}

src/schnorr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ impl Signature {
7878
pub fn from_byte_array(sig: [u8; constants::SCHNORR_SIGNATURE_SIZE]) -> Self { Self(sig) }
7979

8080
/// Creates a `Signature` directly from a slice.
81-
#[deprecated(since = "TBD", note = "Use `from_byte_array` instead.")]
81+
#[deprecated(since = "0.30.0", note = "Use `from_byte_array` instead.")]
8282
#[inline]
8383
pub fn from_slice(data: &[u8]) -> Result<Signature, Error> {
8484
match data.len() {

0 commit comments

Comments
 (0)