Merge rust-bitcoin/rust-bitcoin#3960: Do not implement Default for `sha25t::Hash<T>`

5134025180 api: Run just check-api (Tobin C. Harding)
9b81a8a2ed hashes: Remove sha256t::Hash Default impl (Tobin C. Harding)

Pull request description:

  The other hash types do not implement Default but the tagged one does still - bad bitcoin devs, no biscuit.

ACKs for top commit:
  Kixunil:
    ACK 5134025180
  apoelstra:
    ACK 513402518016bde0d55ec66f8be573bd3e6209ee; successfully ran local tests

Tree-SHA512: 15a98a42e4e06b9d66c1c07a6eda7d013026700e227b6664a462a035c3ffae0ca034d8b0bfd2a94aecd28f2fb73bfead8f88e29934e6d571e93b385e09f05236
This commit is contained in:
merge-script 2025-01-31 13:34:19 +00:00
commit d491af2ce5
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
4 changed files with 0 additions and 9 deletions

View File

@ -475,7 +475,6 @@ impl<T: bitcoin_hashes::sha256t::Tag> core::cmp::PartialEq for bitcoin_hashes::s
impl<T: bitcoin_hashes::sha256t::Tag> core::cmp::PartialOrd for bitcoin_hashes::sha256t::Hash<T>
impl<T: bitcoin_hashes::sha256t::Tag> core::convert::AsRef<[u8; 32]> for bitcoin_hashes::sha256t::Hash<T>
impl<T: bitcoin_hashes::sha256t::Tag> core::convert::AsRef<[u8]> for bitcoin_hashes::sha256t::Hash<T>
impl<T: bitcoin_hashes::sha256t::Tag> core::default::Default for bitcoin_hashes::sha256t::Hash<T>
impl<T: bitcoin_hashes::sha256t::Tag> core::fmt::Debug for bitcoin_hashes::sha256t::Hash<T>
impl<T: bitcoin_hashes::sha256t::Tag> core::fmt::Display for bitcoin_hashes::sha256t::Hash<T>
impl<T: bitcoin_hashes::sha256t::Tag> core::fmt::LowerHex for bitcoin_hashes::sha256t::Hash<T>
@ -845,7 +844,6 @@ pub fn bitcoin_hashes::sha256t::Hash<T>::borrow(&self) -> &[u8; 32]
pub fn bitcoin_hashes::sha256t::Hash<T>::borrow(&self) -> &[u8]
pub fn bitcoin_hashes::sha256t::Hash<T>::clone(&self) -> Self
pub fn bitcoin_hashes::sha256t::Hash<T>::cmp(&self, other: &bitcoin_hashes::sha256t::Hash<T>) -> core::cmp::Ordering
pub fn bitcoin_hashes::sha256t::Hash<T>::default() -> Self
pub fn bitcoin_hashes::sha256t::Hash<T>::deserialize<D: serde::de::Deserializer<'de>>(d: D) -> core::result::Result<bitcoin_hashes::sha256t::Hash<T>, <D as serde::de::Deserializer>::Error>
pub fn bitcoin_hashes::sha256t::Hash<T>::engine() -> bitcoin_hashes::sha256::HashEngine
pub fn bitcoin_hashes::sha256t::Hash<T>::eq(&self, other: &bitcoin_hashes::sha256t::Hash<T>) -> bool

View File

@ -431,7 +431,6 @@ impl<T: bitcoin_hashes::sha256t::Tag> core::cmp::PartialEq for bitcoin_hashes::s
impl<T: bitcoin_hashes::sha256t::Tag> core::cmp::PartialOrd for bitcoin_hashes::sha256t::Hash<T>
impl<T: bitcoin_hashes::sha256t::Tag> core::convert::AsRef<[u8; 32]> for bitcoin_hashes::sha256t::Hash<T>
impl<T: bitcoin_hashes::sha256t::Tag> core::convert::AsRef<[u8]> for bitcoin_hashes::sha256t::Hash<T>
impl<T: bitcoin_hashes::sha256t::Tag> core::default::Default for bitcoin_hashes::sha256t::Hash<T>
impl<T: bitcoin_hashes::sha256t::Tag> core::fmt::Debug for bitcoin_hashes::sha256t::Hash<T>
impl<T: bitcoin_hashes::sha256t::Tag> core::fmt::Display for bitcoin_hashes::sha256t::Hash<T>
impl<T: bitcoin_hashes::sha256t::Tag> core::fmt::LowerHex for bitcoin_hashes::sha256t::Hash<T>
@ -734,7 +733,6 @@ pub fn bitcoin_hashes::sha256t::Hash<T>::borrow(&self) -> &[u8; 32]
pub fn bitcoin_hashes::sha256t::Hash<T>::borrow(&self) -> &[u8]
pub fn bitcoin_hashes::sha256t::Hash<T>::clone(&self) -> Self
pub fn bitcoin_hashes::sha256t::Hash<T>::cmp(&self, other: &bitcoin_hashes::sha256t::Hash<T>) -> core::cmp::Ordering
pub fn bitcoin_hashes::sha256t::Hash<T>::default() -> Self
pub fn bitcoin_hashes::sha256t::Hash<T>::engine() -> bitcoin_hashes::sha256::HashEngine
pub fn bitcoin_hashes::sha256t::Hash<T>::eq(&self, other: &bitcoin_hashes::sha256t::Hash<T>) -> bool
pub fn bitcoin_hashes::sha256t::Hash<T>::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result

View File

@ -395,7 +395,6 @@ impl<T: bitcoin_hashes::sha256t::Tag> core::cmp::PartialEq for bitcoin_hashes::s
impl<T: bitcoin_hashes::sha256t::Tag> core::cmp::PartialOrd for bitcoin_hashes::sha256t::Hash<T>
impl<T: bitcoin_hashes::sha256t::Tag> core::convert::AsRef<[u8; 32]> for bitcoin_hashes::sha256t::Hash<T>
impl<T: bitcoin_hashes::sha256t::Tag> core::convert::AsRef<[u8]> for bitcoin_hashes::sha256t::Hash<T>
impl<T: bitcoin_hashes::sha256t::Tag> core::default::Default for bitcoin_hashes::sha256t::Hash<T>
impl<T: bitcoin_hashes::sha256t::Tag> core::fmt::Debug for bitcoin_hashes::sha256t::Hash<T>
impl<T: bitcoin_hashes::sha256t::Tag> core::hash::Hash for bitcoin_hashes::sha256t::Hash<T>
impl<T: bitcoin_hashes::sha256t::Tag> core::marker::Copy for bitcoin_hashes::sha256t::Hash<T>
@ -687,7 +686,6 @@ pub fn bitcoin_hashes::sha256t::Hash<T>::borrow(&self) -> &[u8; 32]
pub fn bitcoin_hashes::sha256t::Hash<T>::borrow(&self) -> &[u8]
pub fn bitcoin_hashes::sha256t::Hash<T>::clone(&self) -> Self
pub fn bitcoin_hashes::sha256t::Hash<T>::cmp(&self, other: &bitcoin_hashes::sha256t::Hash<T>) -> core::cmp::Ordering
pub fn bitcoin_hashes::sha256t::Hash<T>::default() -> Self
pub fn bitcoin_hashes::sha256t::Hash<T>::engine() -> bitcoin_hashes::sha256::HashEngine
pub fn bitcoin_hashes::sha256t::Hash<T>::eq(&self, other: &bitcoin_hashes::sha256t::Hash<T>) -> bool
pub fn bitcoin_hashes::sha256t::Hash<T>::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result

View File

@ -119,9 +119,6 @@ impl<T: Tag> PartialEq for Hash<T> {
fn eq(&self, other: &Hash<T>) -> bool { self.0 == other.0 }
}
impl<T: Tag> Eq for Hash<T> {}
impl<T: Tag> Default for Hash<T> {
fn default() -> Self { Hash([0; 32], PhantomData) }
}
impl<T: Tag> PartialOrd for Hash<T> {
fn partial_cmp(&self, other: &Hash<T>) -> Option<cmp::Ordering> {
Some(cmp::Ord::cmp(self, other))