Replace assert!(false) with panic!
Clippy emits: warning: `assert!(false)` should probably be replaced As suggested, replace assert with a call to panic.
This commit is contained in:
parent
a8039e1742
commit
922b820105
|
@ -517,7 +517,7 @@ mod tests {
|
|||
// test with zero target
|
||||
match some_header.validate_pow(&Uint256::default()) {
|
||||
Err(BlockBadTarget) => (),
|
||||
_ => assert!(false)
|
||||
_ => panic!("unexpected result from validate_pow"),
|
||||
}
|
||||
|
||||
// test with modified header
|
||||
|
@ -525,7 +525,7 @@ mod tests {
|
|||
invalid_header.version = invalid_header.version + 1;
|
||||
match invalid_header.validate_pow(&invalid_header.target()) {
|
||||
Err(BlockBadProofOfWork) => (),
|
||||
_ => assert!(false)
|
||||
_ => panic!("unexpected result from validate_pow"),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue