mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 00:31:07 +00:00
Fix warnings related to panic and assert (#8272)
We were using the wrong syntax and that will be dropped with Rust 2021. The compiler already starts to hint the wrong syntax with warnings. So, we fix this here.
This commit is contained in:
@@ -684,10 +684,13 @@ fn changes_proof_is_generated_and_checked_when_headers_are_not_pruned() {
|
||||
}).unwrap();
|
||||
|
||||
// ..and ensure that result is the same as on remote node
|
||||
match local_result == expected_result {
|
||||
true => (),
|
||||
false => panic!(format!("Failed test {}: local = {:?}, expected = {:?}",
|
||||
index, local_result, expected_result)),
|
||||
if local_result != expected_result {
|
||||
panic!(
|
||||
"Failed test {}: local = {:?}, expected = {:?}",
|
||||
index,
|
||||
local_result,
|
||||
expected_result,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -988,10 +988,13 @@ fn key_changes_works() {
|
||||
None,
|
||||
&StorageKey(key),
|
||||
).unwrap();
|
||||
match actual_result == expected_result {
|
||||
true => (),
|
||||
false => panic!(format!("Failed test {}: actual = {:?}, expected = {:?}",
|
||||
index, actual_result, expected_result)),
|
||||
if actual_result != expected_result {
|
||||
panic!(
|
||||
"Failed test {}: actual = {:?}, expected = {:?}",
|
||||
index,
|
||||
actual_result,
|
||||
expected_result,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user