Skip to content

Commit f84c3c6

Browse files
committed
Use plus-equals operator
Clippy emits: warning: manual implementation of an assign operation Use the more conventional `+=` operator.
1 parent 333b32e commit f84c3c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/blockdata/block.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ mod tests {
522522

523523
// test with modified header
524524
let mut invalid_header: BlockHeader = some_header.clone();
525-
invalid_header.version = invalid_header.version + 1;
525+
invalid_header.version += 1;
526526
match invalid_header.validate_pow(&invalid_header.target()) {
527527
Err(BlockBadProofOfWork) => (),
528528
_ => panic!("unexpected result from validate_pow"),

0 commit comments

Comments
 (0)