mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-04-29 04:05:21 +08:00
CRC: revert panic!(MESSAGE) to assert!(false, MESSAGE) and silence warnings
Signed-off-by: Jacinta Ferrant <jacinta@trustmachines.co>
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![cfg_attr(test, allow(unused_variables, unused_assignments))]
|
||||
#![allow(clippy::assertions_on_constants)]
|
||||
|
||||
extern crate curve25519_dalek;
|
||||
extern crate ed25519_dalek;
|
||||
|
||||
@@ -426,7 +426,8 @@ mod test {
|
||||
0
|
||||
}
|
||||
_ => {
|
||||
panic!("unwrapped err: {:?}", &e);
|
||||
assert!(false, "unwrapped err: {:?}", &e);
|
||||
unreachable!();
|
||||
}
|
||||
},
|
||||
};
|
||||
@@ -459,7 +460,8 @@ mod test {
|
||||
0
|
||||
}
|
||||
_ => {
|
||||
panic!("unwrapped err: {:?}", &e);
|
||||
assert!(false, "unwrapped err: {:?}", &e);
|
||||
unreachable!();
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
@@ -549,7 +549,7 @@ mod tests {
|
||||
(_, _) => {
|
||||
// either got a key when we didn't expect one, or didn't get a key when we did
|
||||
// expect one.
|
||||
panic!("Unexpected result: we either got a key when we didn't expect one, or didn't get a key when we did expect one.");
|
||||
assert!(false, "Unexpected result: we either got a key when we didn't expect one, or didn't get a key when we did expect one.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -619,13 +619,15 @@ mod tests {
|
||||
(Err(e1), Err(e2)) => assert_eq!(e1, e2),
|
||||
(Err(e1), _) => {
|
||||
test_debug!("Failed to verify signature: {}", e1);
|
||||
panic!(
|
||||
assert!(
|
||||
false,
|
||||
"failed fixture (verification: {:?}): {:#?}",
|
||||
&ver_res, &fixture
|
||||
);
|
||||
}
|
||||
(_, _) => {
|
||||
panic!(
|
||||
assert!(
|
||||
false,
|
||||
"failed fixture (verification: {:?}): {:#?}",
|
||||
&ver_res, &fixture
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user