diff --git a/hashes/src/hmac.rs b/hashes/src/hmac.rs index 2e30277f7..b3f931a12 100644 --- a/hashes/src/hmac.rs +++ b/hashes/src/hmac.rs @@ -129,7 +129,7 @@ impl Hash for Hmac { fn from_byte_array(bytes: T::Bytes) -> Self { Hmac(T::from_byte_array(bytes)) } - #[allow(deprecated_in_future)] + #[allow(deprecated)] fn from_slice(sl: &[u8]) -> Result, FromSliceError> { T::from_slice(sl).map(Hmac) } fn to_byte_array(self) -> Self::Bytes { self.0.to_byte_array() } diff --git a/hashes/src/internal_macros.rs b/hashes/src/internal_macros.rs index c17c8f1a8..929399342 100644 --- a/hashes/src/internal_macros.rs +++ b/hashes/src/internal_macros.rs @@ -99,7 +99,7 @@ macro_rules! hash_trait_impls { fn from_byte_array(bytes: Self::Bytes) -> Self { Self::from_byte_array(bytes) } - #[allow(deprecated_in_future)] + #[allow(deprecated)] fn from_slice(sl: &[u8]) -> $crate::_export::_core::result::Result, $crate::FromSliceError> { Self::from_slice(sl) } diff --git a/hashes/src/lib.rs b/hashes/src/lib.rs index 54302534b..71ee874b3 100644 --- a/hashes/src/lib.rs +++ b/hashes/src/lib.rs @@ -112,7 +112,7 @@ pub mod sha512; pub mod sha512_256; pub mod siphash24; -#[deprecated(since = "TBD", note = "use crate::macros instead")] +#[deprecated(since = "0.15.0", note = "use crate::macros instead")] pub mod serde_macros { //! Macros for serde trait implementations, and supporting code. @@ -284,7 +284,7 @@ pub trait Hash: fn from_byte_array(bytes: Self::Bytes) -> Self; /// Copies a byte slice into a hash object. - #[deprecated(since = "TBD", note = "use `from_byte_array` instead")] + #[deprecated(since = "0.15.0", note = "use `from_byte_array` instead")] fn from_slice(sl: &[u8]) -> Result; /// Returns the underlying byte array. diff --git a/hashes/src/macros.rs b/hashes/src/macros.rs index 45b7e9f5a..46bffc5fd 100644 --- a/hashes/src/macros.rs +++ b/hashes/src/macros.rs @@ -175,8 +175,8 @@ macro_rules! hash_newtype { } /// Copies a byte slice into a hash object. - #[deprecated(since = "TBD", note = "use `from_byte_array` instead")] - #[allow(deprecated_in_future)] + #[deprecated(since = "0.15.0", note = "use `from_byte_array` instead")] + #[allow(deprecated)] pub fn from_slice(sl: &[u8]) -> $crate::_export::_core::result::Result<$newtype, $crate::FromSliceError> { Ok($newtype(<$hash as $crate::Hash>::from_slice(sl)?)) } @@ -213,7 +213,7 @@ macro_rules! hash_newtype { fn from_byte_array(bytes: Self::Bytes) -> Self { Self::from_byte_array(bytes) } #[inline] - #[allow(deprecated_in_future)] + #[allow(deprecated)] fn from_slice(sl: &[u8]) -> $crate::_export::_core::result::Result<$newtype, $crate::FromSliceError> { Self::from_slice(sl) } diff --git a/hashes/src/sha256.rs b/hashes/src/sha256.rs index 7bd2576db..4aa2c6467 100644 --- a/hashes/src/sha256.rs +++ b/hashes/src/sha256.rs @@ -144,7 +144,7 @@ impl Hash { /// Computes hash from `bytes` in `const` context. /// /// Warning: this function is inefficient. It should be only used in `const` context. - #[deprecated(since = "TBD", note = "use `Self::hash_unoptimized` instead")] + #[deprecated(since = "0.15.0", note = "use `Self::hash_unoptimized` instead")] pub const fn const_hash(bytes: &[u8]) -> Self { Hash::hash_unoptimized(bytes) } /// Computes hash from `bytes` in `const` context. diff --git a/hashes/src/sha256t.rs b/hashes/src/sha256t.rs index af249b0fd..f68991780 100644 --- a/hashes/src/sha256t.rs +++ b/hashes/src/sha256t.rs @@ -43,7 +43,7 @@ where } /// Copies a byte slice into a hash object. - #[deprecated(since = "TBD", note = "use `from_byte_array` instead")] + #[deprecated(since = "0.15.0", note = "use `from_byte_array` instead")] pub fn from_slice(sl: &[u8]) -> Result, FromSliceError> { if sl.len() != 32 { Err(FromSliceError { expected: 32, got: sl.len() }) @@ -186,6 +186,7 @@ macro_rules! sha256t_tag { /// The syntax is: /// /// ``` +/// # #[allow(deprecated)] { /// # use bitcoin_hashes::sha256t_hash_newtype; /// sha256t_hash_newtype! { /// /// Optional documentation details here. @@ -197,6 +198,7 @@ macro_rules! sha256t_tag { /// #[hash_newtype(backward)] /// pub struct FooHash(_); /// } +/// # } /// ``` /// /// The structs must be defined in this order - tag first, then hash type. `hash_str` marker @@ -211,7 +213,7 @@ macro_rules! sha256t_tag { /// /// [`hash_newtype`]: crate::hash_newtype #[macro_export] -#[deprecated(since = "TBD", note = "use `sha256_tag!` combined with `hash_newtype!` instead")] +#[deprecated(since = "0.15.0", note = "use `sha256_tag!` combined with `hash_newtype!` instead")] macro_rules! sha256t_hash_newtype { ($(#[$($tag_attr:tt)*])* $tag_vis:vis struct $tag:ident = $constructor:tt($($tag_value:tt)+); $(#[$($hash_attr:tt)*])* $hash_vis:vis struct $hash_name:ident($(#[$($field_attr:tt)*])* _);) => { $crate::sha256t_tag_struct!($tag_vis, $tag, stringify!($hash_name), $(#[$($tag_attr)*])*); diff --git a/hashes/src/siphash24.rs b/hashes/src/siphash24.rs index a40f8185c..c9ebda442 100644 --- a/hashes/src/siphash24.rs +++ b/hashes/src/siphash24.rs @@ -1,3 +1,4 @@ + // SPDX-License-Identifier: CC0-1.0 //! SipHash 2-4 implementation. @@ -203,7 +204,7 @@ impl Hash { } /// Returns the (little endian) 64-bit integer representation of the hash value. - #[deprecated(since = "TBD", note = "use `to_u64` instead")] + #[deprecated(since = "0.15.0", note = "use `to_u64` instead")] pub fn as_u64(&self) -> u64 { self.to_u64() } /// Returns the (little endian) 64-bit integer representation of the hash value.