Use plus-equals operator

Clippy emits:

  warning: manual implementation of an assign operation

Use the more conventional `+=` operator.
This commit is contained in:
Tobin C. Harding 2022-06-07 15:04:26 +10:00
parent 922b820105
commit ef90e3d4ed
1 changed files with 1 additions and 1 deletions

View File

@ -522,7 +522,7 @@ mod tests {
// test with modified header // test with modified header
let mut invalid_header: BlockHeader = some_header.clone(); 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()) { match invalid_header.validate_pow(&invalid_header.target()) {
Err(BlockBadProofOfWork) => (), Err(BlockBadProofOfWork) => (),
_ => panic!("unexpected result from validate_pow"), _ => panic!("unexpected result from validate_pow"),