aboutsummaryrefslogtreecommitdiff
path: root/tests/util
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2019-07-06 00:30:38 +0200
committerRobin Krahl <robin.krahl@ireas.org>2019-07-06 00:30:38 +0200
commitd426f1a56fedbb8b9fdc6c797f837a770e923029 (patch)
tree84b6b6a6cbdda473c79c39544a7e1a3ea47da2ba /tests/util
parent606177a61de39ba5e96390d63cff536f895d8c39 (diff)
parentd95355e3d76c0c0022629e635f36a2dc325c0af2 (diff)
downloadnitrokey-rs-d426f1a56fedbb8b9fdc6c797f837a770e923029.tar.gz
nitrokey-rs-d426f1a56fedbb8b9fdc6c797f837a770e923029.tar.bz2
Merge branch 'revert' into next
The tests with the 0.4.0-alpha.1 version showed that the approach using mutable references to the Device in User, Admin and PasswordSafe causes problems in nitrocli, see [0]. Therefore, these changes are reverted. [0] https://lists.sr.ht/~ireas/nitrokey-rs-dev/%3C43cc304d-23e8-7f95-2167-ce3f0530b81e%40posteo.net%3E * revert: Revert "Store mutable reference to Device in PasswordSafe" Revert "Refactor User and Admin to use a mutable reference"
Diffstat (limited to 'tests/util')
-rw-r--r--tests/util/mod.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/util/mod.rs b/tests/util/mod.rs
index 5bd19d1..f2b20ec 100644
--- a/tests/util/mod.rs
+++ b/tests/util/mod.rs
@@ -3,7 +3,7 @@
#[macro_export]
macro_rules! unwrap_ok {
- ($val:expr) => {
+ ($val:expr) => {{
match $val {
Ok(val) => val,
Err(err) => panic!(
@@ -13,12 +13,12 @@ macro_rules! unwrap_ok {
err
),
}
- };
+ }};
}
#[macro_export]
macro_rules! assert_any_ok {
- ($val:expr) => {
+ ($val:expr) => {{
match &$val {
Ok(_) => {}
Err(err) => panic!(
@@ -28,12 +28,12 @@ macro_rules! assert_any_ok {
err
),
}
- };
+ }};
}
#[macro_export]
macro_rules! assert_ok {
- ($left:expr, $right:expr) => {
+ ($left:expr, $right:expr) => {{
match &$right {
Ok(right) => match &$left {
left => {
@@ -54,7 +54,7 @@ macro_rules! assert_ok {
$left, right_err
),
}
- };
+ }};
}
#[macro_export]