From 15706f8708af4175a5376026cdd7c6f821945a5d Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Mon, 28 May 2018 20:22:01 +0000 Subject: 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. --- src/tests/pro.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tests/pro.rs') 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(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); -- cgit v1.2.1