Merge rust-bitcoin/rust-bitcoin#2138: Remove several unnecessary clippy attributes

750ee2ba56 Remove unnecessary clippy attribute on is_sighash_single_bug (Steven Roose)
f522a0290c Remove unnecessary clippy attribute on relative::LockTime (Steven Roose)
b7f11d4493 Remove unnecessary clippy attribute on absolute::LockTime (Steven Roose)

Pull request description:

  Am I missing something and are they necessary in some other clippy configuration than the one I ran?

  It's surprising really that clippy doesn't have a lint to notice unnecessary clippy exception attributes..

ACKs for top commit:
  tcharding:
    ACK 750ee2ba56
  apoelstra:
    ACK 750ee2ba56

Tree-SHA512: 0bed6e014d110a531d0a4a0b003778a7ae9c59ac90e8bbcc518321e48141a77fcdfaddf54b752d2733154ad1945609a9a8dcf121d2a813e7a2ee098af26951f7
This commit is contained in:
Andrew Poelstra 2023-10-23 18:23:12 +00:00
commit 4c66132c0f
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
3 changed files with 0 additions and 3 deletions

View File

@ -66,7 +66,6 @@ pub const LOCK_TIME_THRESHOLD: u32 = 500_000_000;
/// _ => panic!("handle invalid comparison error"),
/// };
/// ```
#[allow(clippy::derive_ord_xor_partial_ord)]
#[derive(Clone, Copy, PartialEq, Eq, Hash)]
pub enum LockTime {
/// A block height lock time value.

View File

@ -26,7 +26,6 @@ use crate::relative;
///
/// * [BIP 68 Relative lock-time using consensus-enforced sequence numbers](https://github.com/bitcoin/bips/blob/master/bip-0065.mediawiki)
/// * [BIP 112 CHECKSEQUENCEVERIFY](https://github.com/bitcoin/bips/blob/master/bip-0112.mediawiki)
#[allow(clippy::derive_ord_xor_partial_ord)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde", serde(crate = "actual_serde"))]

View File

@ -1237,7 +1237,6 @@ impl<E> EncodeSigningDataResult<E> {
/// // use a hash value of "1", instead of computing the actual hash due to SIGHASH_SINGLE bug
/// }
/// ```
#[allow(clippy::wrong_self_convention)] // E is not Copy so we consume self.
pub fn is_sighash_single_bug(self) -> Result<bool, E> {
match self {
EncodeSigningDataResult::SighashSingleBug => Ok(true),