aboutsummaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2020-04-01 22:59:22 -0700
committerDaniel Mueller <deso@posteo.net>2020-04-01 22:59:22 -0700
commita3f8ae474d153048c5a9252125099ef49cc6b5f4 (patch)
tree106663b08f026cd873f0b6168a1d108925ab8e24 /src/tests
parent550a730cb7ab9c9e3963ba46ac7cad93535f13d5 (diff)
downloadnitrocli-a3f8ae474d153048c5a9252125099ef49cc6b5f4.tar.gz
nitrocli-a3f8ae474d153048c5a9252125099ef49cc6b5f4.tar.bz2
Factor out arg_defs.rs for argument parsing related types
This change marks the first step in a restructuring of the argument handling code, the ultimate goal of which is a separation of the type definitions as used by structopt from the logic associated with it. This change in particular introduces a new module, arg_defs, that contains all those type definitions that previously resided in the args module.
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/otp.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tests/otp.rs b/src/tests/otp.rs
index 0ccecf9..4ce1156 100644
--- a/src/tests/otp.rs
+++ b/src/tests/otp.rs
@@ -19,7 +19,7 @@
use super::*;
-use crate::args;
+use crate::arg_defs;
#[test_device]
fn set_invalid_slot_raw(model: nitrokey::Model) {
@@ -101,8 +101,8 @@ fn set_get_totp(model: nitrokey::Model) -> crate::Result<()> {
#[test_device]
fn set_totp_uneven_chars(model: nitrokey::Model) -> crate::Result<()> {
let secrets = [
- (args::OtpSecretFormat::Hex, "123"),
- (args::OtpSecretFormat::Base32, "FBILDWWGA2"),
+ (arg_defs::OtpSecretFormat::Hex, "123"),
+ (arg_defs::OtpSecretFormat::Base32, "FBILDWWGA2"),
];
for (format, secret) in &secrets {