From 24250081fe899b2f4ddfcf1fffc812e8c5e7b83e Mon Sep 17 00:00:00 2001 From: Daniel Mueller Date: Sat, 5 Sep 2020 06:14:38 -0700 Subject: Remove Nitrocli::model method While the Nitrocli::model() method was well intentioned, we do not actually need it because we create a Nitrocli instance from the model passed to the individual test. We can just reuse this model instead. With this patch we do exactly that, allowing us to get rid of Nitrocli::model() all together. --- src/tests/pin.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tests/pin.rs') diff --git a/src/tests/pin.rs b/src/tests/pin.rs index 551454c..7770fba 100644 --- a/src/tests/pin.rs +++ b/src/tests/pin.rs @@ -61,7 +61,7 @@ fn set_user(model: nitrokey::Model) -> anyhow::Result<()> { { let mut manager = nitrokey::force_take()?; - let device = manager.connect_model(ncli.model().unwrap())?; + let device = manager.connect_model(model)?; let _ = device .authenticate_user(nitrokey::DEFAULT_USER_PIN) .unwrap(); -- cgit v1.2.1