diff options
author | Robin Krahl <robin.krahl@ireas.org> | 2018-05-31 11:39:13 +0200 |
---|---|---|
committer | Robin Krahl <robin.krahl@ireas.org> | 2018-05-31 11:39:13 +0200 |
commit | bdb5ba7157ad93461bb1deea4b232178d16ef4c9 (patch) | |
tree | 3f3d14ed8f60e4802bc9f145a0d7e48aa72aea20 /src/tests | |
parent | c37899dfee9057497f6622149e3b06ae8def55d5 (diff) | |
download | nitrokey-rs-bdb5ba7157ad93461bb1deea4b232178d16ef4c9.tar.gz nitrokey-rs-bdb5ba7157ad93461bb1deea4b232178d16ef4c9.tar.bz2 |
Fix formatting issues
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/device.rs | 2 | ||||
-rw-r--r-- | src/tests/otp.rs | 7 | ||||
-rw-r--r-- | src/tests/pws.rs | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/src/tests/device.rs b/src/tests/device.rs index 80541d4..6c24025 100644 --- a/src/tests/device.rs +++ b/src/tests/device.rs @@ -1,6 +1,6 @@ use std::ffi::CStr; -use {Authenticate, CommandError, CommandStatus, Config, Device}; use tests::util::{Target, ADMIN_PASSWORD, USER_PASSWORD}; +use {Authenticate, CommandError, CommandStatus, Config, Device}; static ADMIN_NEW_PASSWORD: &str = "1234567890"; static USER_NEW_PASSWORD: &str = "abcdefghij"; diff --git a/src/tests/otp.rs b/src/tests/otp.rs index de3b646..44689be 100644 --- a/src/tests/otp.rs +++ b/src/tests/otp.rs @@ -1,7 +1,7 @@ use std::ops::Deref; +use tests::util::{Target, ADMIN_PASSWORD, USER_PASSWORD}; use {Admin, Authenticate, CommandError, CommandStatus, Config, ConfigureOtp, GenerateOtp, OtpMode, OtpSlotData}; -use tests::util::{Target, ADMIN_PASSWORD, USER_PASSWORD}; // test suite according to RFC 4226, Appendix D static HOTP_SECRET: &str = "3132333435363738393031323334353637383930"; @@ -30,7 +30,10 @@ fn get_admin_test_device() -> Admin<Target> { fn configure_hotp(admin: &ConfigureOtp, counter: u8) { let slot_data = OtpSlotData::new(1, "test-hotp", HOTP_SECRET, OtpMode::SixDigits); - assert_eq!(CommandStatus::Success, admin.write_hotp_slot(slot_data, counter.into())); + assert_eq!( + CommandStatus::Success, + admin.write_hotp_slot(slot_data, counter.into()) + ); } fn check_hotp_codes(device: &GenerateOtp, offset: u8) { diff --git a/src/tests/pws.rs b/src/tests/pws.rs index 5f5a325..f45a81a 100644 --- a/src/tests/pws.rs +++ b/src/tests/pws.rs @@ -1,6 +1,6 @@ -use util::{CommandError, CommandStatus}; use pws::{GetPasswordSafe, PasswordSafe, SLOT_COUNT}; use tests::util::{Target, ADMIN_PASSWORD, USER_PASSWORD}; +use util::{CommandError, CommandStatus}; fn get_pws() -> PasswordSafe<Target> { Target::connect() |