From ef90e3d4edc319d280af2ad963a79ef41065058e Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Tue, 7 Jun 2022 15:04:26 +1000 Subject: [PATCH] Use plus-equals operator Clippy emits: warning: manual implementation of an assign operation Use the more conventional `+=` operator. --- src/blockdata/block.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/blockdata/block.rs b/src/blockdata/block.rs index 24ba4bc7..1d9e7a11 100644 --- a/src/blockdata/block.rs +++ b/src/blockdata/block.rs @@ -522,7 +522,7 @@ mod tests { // test with modified header let mut invalid_header: BlockHeader = some_header.clone(); - invalid_header.version = invalid_header.version + 1; + invalid_header.version += 1; match invalid_header.validate_pow(&invalid_header.target()) { Err(BlockBadProofOfWork) => (), _ => panic!("unexpected result from validate_pow"),