From 08c4a2204a75deb48c799a42cf2f5f4f8d6b83a7 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Tue, 2 Aug 2022 08:40:20 +1000 Subject: [PATCH] Allow wrong_self_convention for non-Copy type Clippy gives a warning about `wrong_self_convention` because we consume self in a method called `is_*`. We have to consume self because the object has a generic `E` (error type) that does not implement `Copy`. --- src/blockdata/transaction.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/blockdata/transaction.rs b/src/blockdata/transaction.rs index 901e26fb..b52c211e 100644 --- a/src/blockdata/transaction.rs +++ b/src/blockdata/transaction.rs @@ -503,6 +503,7 @@ impl EncodeSigningDataResult { /// // 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 { match self { EncodeSigningDataResult::SighashSingleBug => Ok(true),