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:
parent
0786d92a5c
commit
08c4a2204a
|
@ -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
|
/// // 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> {
|
pub fn is_sighash_single_bug(self) -> Result<bool, E> {
|
||||||
match self {
|
match self {
|
||||||
EncodeSigningDataResult::SighashSingleBug => Ok(true),
|
EncodeSigningDataResult::SighashSingleBug => Ok(true),
|
||||||
|
|
Loading…
Reference in New Issue