aboutsummaryrefslogtreecommitdiff
path: root/src/tests/pro.rs
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2018-05-28 20:22:01 +0000
committerRobin Krahl <robin.krahl@ireas.org>2018-05-28 22:22:54 +0200
commit15706f8708af4175a5376026cdd7c6f821945a5d (patch)
treedf66bd75aaff9410c7f0af60daa1ace2fc702c53 /src/tests/pro.rs
parent1ceea28c65b60c31c6c2667cd6de90935e4b9dc1 (diff)
downloadnitrokey-rs-15706f8708af4175a5376026cdd7c6f821945a5d.tar.gz
nitrokey-rs-15706f8708af4175a5376026cdd7c6f821945a5d.tar.bz2
Move set_time from Device to GenerateOtp
The set_time operation is only used with TOTP generation. Therefore it makes more sense to have it in the GenerateOtp trait than in the Device trait.
Diffstat (limited to 'src/tests/pro.rs')
-rw-r--r--src/tests/pro.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tests/pro.rs b/src/tests/pro.rs
index 915b45b..e52c287 100644
--- a/src/tests/pro.rs
+++ b/src/tests/pro.rs
@@ -180,7 +180,7 @@ fn configure_totp(admin: &ConfigureOtp) {
assert_eq!(CommandStatus::Success, admin.write_totp_slot(slot_data, 30));
}
-fn check_totp_codes<T: Device + GenerateOtp>(device: &T) {
+fn check_totp_codes(device: &GenerateOtp) {
for (i, &(time, code)) in TOTP_CODES.iter().enumerate() {
assert_eq!(CommandStatus::Success, device.set_time(time));
let result = device.get_totp_code(1);