diff options
author | Robin Krahl <robin.krahl@ireas.org> | 2019-01-17 12:47:52 +0000 |
---|---|---|
committer | Robin Krahl <robin.krahl@ireas.org> | 2019-01-20 21:08:50 +0000 |
commit | 5e258d26b55af6bed7c316b1c7ac12e20946702d (patch) | |
tree | fee2be71586bef2f1978eb1cf40ef84c8ac6492b /tests/device.rs | |
parent | 944e1fa0d51e547dde2a9368d2b8431b109f63c4 (diff) | |
download | nitrokey-rs-5e258d26b55af6bed7c316b1c7ac12e20946702d.tar.gz nitrokey-rs-5e258d26b55af6bed7c316b1c7ac12e20946702d.tar.bz2 |
Refactor library errors into LibraryError enum
Previously, library errors were part of the CommandError enum. As
command errors and library errors are two different error types, they
should be split into two enums.
Diffstat (limited to 'tests/device.rs')
-rw-r--r-- | tests/device.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/device.rs b/tests/device.rs index 174624f..ee5dae1 100644 --- a/tests/device.rs +++ b/tests/device.rs @@ -6,7 +6,7 @@ use std::{thread, time}; use nitrokey::{ Authenticate, CommandError, Config, ConfigureOtp, Device, Error, GenerateOtp, GetPasswordSafe, - OtpMode, OtpSlotData, Storage, VolumeMode, + LibraryError, OtpMode, OtpSlotData, Storage, VolumeMode, }; use nitrokey_test::test as test_device; @@ -130,7 +130,7 @@ fn config(device: DeviceWrapper) { assert_eq!(config, get_config); let config = Config::new(None, Some(9), None, true); - assert_cmd_err!(CommandError::InvalidSlot, admin.write_config(config)); + assert_lib_err!(LibraryError::InvalidSlot, admin.write_config(config)); let config = Config::new(Some(1), None, Some(0), false); assert_ok!((), admin.write_config(config)); |