aboutsummaryrefslogtreecommitdiff
path: root/nitrocli/src/tests/pin.rs
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2019-08-12 22:07:44 -0700
committerDaniel Mueller <deso@posteo.net>2019-08-12 22:07:44 -0700
commitd86a4bb717f9930f9cbc49008d6c4ee10783da14 (patch)
treeb77ba026d07cfbce3039dd768628e2761284c990 /nitrocli/src/tests/pin.rs
parent3bc2a5572fb428f4d3038df979344a65b8ef67ff (diff)
downloadnitrocli-d86a4bb717f9930f9cbc49008d6c4ee10783da14.tar.gz
nitrocli-d86a4bb717f9930f9cbc49008d6c4ee10783da14.tar.bz2
Update nitrokey crate to 0.4.0-alpha.2
This change updates the dependency to nitrokey to version 0.4.0-alpha.2. In addition to minor interface changes for the get_*_firmware_version and get_*_retry_count functions, several functions that change the device state now require a mutable handle to the nitrokey. Hence, this patch a number of function signatures to accept mutable device objects. Import subrepo nitrokey/:nitrokey at 34efcfadf1436102e42144f710edabaa2c4b55cd
Diffstat (limited to 'nitrocli/src/tests/pin.rs')
-rw-r--r--nitrocli/src/tests/pin.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/nitrocli/src/tests/pin.rs b/nitrocli/src/tests/pin.rs
index 051129c..e4cd316 100644
--- a/nitrocli/src/tests/pin.rs
+++ b/nitrocli/src/tests/pin.rs
@@ -29,12 +29,12 @@ fn unblock(device: nitrokey::DeviceWrapper) -> crate::Result<()> {
nitrokey::Error::CommandError(err) if err == nitrokey::CommandError::WrongPassword => (),
_ => panic!("Unexpected error variant found: {:?}", err),
}
- assert!(device.get_user_retry_count() < 3);
+ assert!(device.get_user_retry_count()? < 3);
let model = device.get_model();
let _ = Nitrocli::with_dev(device).handle(&["pin", "unblock"])?;
let device = nitrokey::connect_model(model)?;
- assert_eq!(device.get_user_retry_count(), 3);
+ assert_eq!(device.get_user_retry_count()?, 3);
Ok(())
}