mirror of
https://github.com/mimblewimble/grin.git
synced 2025-02-01 08:51:08 +03:00
Fix 2 compiler warnings. More \n around panic outputs (#867)
* avoid compiler warnings on 3 tests * more newlines around logging a panic
This commit is contained in:
parent
3f1e7e6506
commit
ccf0c11da6
3 changed files with 4 additions and 4 deletions
|
@ -1009,7 +1009,7 @@ mod test {
|
||||||
let keychain = Keychain::from_random_seed().unwrap();
|
let keychain = Keychain::from_random_seed().unwrap();
|
||||||
let key_id = keychain.derive_key_id(1).unwrap();
|
let key_id = keychain.derive_key_id(1).unwrap();
|
||||||
let commit = keychain.commit(5, &key_id).unwrap();
|
let commit = keychain.commit(5, &key_id).unwrap();
|
||||||
let mut msg = ProofMessage::from_bytes(&[0u8; 64]);
|
let msg = ProofMessage::from_bytes(&[0u8; 64]);
|
||||||
let extra_data = [99u8; 64];
|
let extra_data = [99u8; 64];
|
||||||
|
|
||||||
let proof = keychain
|
let proof = keychain
|
||||||
|
@ -1062,7 +1062,7 @@ mod test {
|
||||||
// cannot rewind with wrong extra committed data
|
// cannot rewind with wrong extra committed data
|
||||||
let commit3 = keychain.commit(4, &key_id).unwrap();
|
let commit3 = keychain.commit(4, &key_id).unwrap();
|
||||||
let wrong_extra_data = [98u8; 64];
|
let wrong_extra_data = [98u8; 64];
|
||||||
let should_err = keychain
|
let _should_err = keychain
|
||||||
.rewind_range_proof(
|
.rewind_range_proof(
|
||||||
&key_id,
|
&key_id,
|
||||||
commit3,
|
commit3,
|
||||||
|
|
|
@ -134,7 +134,7 @@ fn send_panic_to_log() {
|
||||||
Some(location) => {
|
Some(location) => {
|
||||||
error!(
|
error!(
|
||||||
LOGGER,
|
LOGGER,
|
||||||
"thread '{}' panicked at '{}': {}:{}{:?}",
|
"\nthread '{}' panicked at '{}': {}:{}{:?}\n\n",
|
||||||
thread,
|
thread,
|
||||||
msg,
|
msg,
|
||||||
location.file(),
|
location.file(),
|
||||||
|
|
|
@ -29,7 +29,7 @@ fn zip_unzip() {
|
||||||
|
|
||||||
let zip_file = File::create(zip_name).unwrap();
|
let zip_file = File::create(zip_name).unwrap();
|
||||||
zip::compress(&root.join("./to_zip"), &zip_file).unwrap();
|
zip::compress(&root.join("./to_zip"), &zip_file).unwrap();
|
||||||
zip_file.sync_all();
|
zip_file.sync_all().unwrap();
|
||||||
|
|
||||||
let zip_path = Path::new(zip_name);
|
let zip_path = Path::new(zip_name);
|
||||||
assert!(zip_path.exists());
|
assert!(zip_path.exists());
|
||||||
|
|
Loading…
Reference in a new issue