Skip to content

Commit 333b32e

Browse files
committed
Replace assert!(false) with panic!
Clippy emits: warning: `assert!(false)` should probably be replaced As suggested, replace assert with a call to panic.
1 parent 4192061 commit 333b32e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/blockdata/block.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,15 +517,15 @@ mod tests {
517517
// test with zero target
518518
match some_header.validate_pow(&Uint256::default()) {
519519
Err(BlockBadTarget) => (),
520-
_ => assert!(false)
520+
_ => panic!("unexpected result from validate_pow"),
521521
}
522522

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

0 commit comments

Comments
 (0)