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`.
This commit is contained in:
Tobin C. Harding 2022-08-02 08:40:20 +10:00
parent 0786d92a5c
commit 08c4a2204a
1 changed files with 1 additions and 0 deletions

View File

@ -503,6 +503,7 @@ 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),