aboutsummaryrefslogtreecommitdiff
path: root/tests/device.rs
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2019-01-27 18:21:08 +0000
committerRobin Krahl <robin.krahl@ireas.org>2019-07-08 21:33:13 +0000
commit379bc798477a1de7ffda923c5d10ca63aebae25f (patch)
tree1cd4dcbc9ddcbf23b9f546d097f3d5ef2f454992 /tests/device.rs
parentbd7c7a5fdf0ae66a1ff2f00beb5ed4c2e6994ca1 (diff)
downloadnitrokey-rs-379bc798477a1de7ffda923c5d10ca63aebae25f.tar.gz
nitrokey-rs-379bc798477a1de7ffda923c5d10ca63aebae25f.tar.bz2
Move {Pro, Storage}::connect into Manager
As part of the connection refactoring, this patch moves the connect methods of the Pro and Storage structs into the Manager struct. To maintain compatibility with nitrokey-test, the old methods are not removed but marked as deprecated.
Diffstat (limited to 'tests/device.rs')
-rw-r--r--tests/device.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/device.rs b/tests/device.rs
index 527d6f2..b377f2e 100644
--- a/tests/device.rs
+++ b/tests/device.rs
@@ -60,7 +60,7 @@ fn connect_pro(device: Pro) {
assert_any_ok!(nitrokey::connect());
assert_any_ok!(nitrokey::take().unwrap().connect_model(nitrokey::Model::Pro));
- assert_any_ok!(nitrokey::Pro::connect());
+ assert_any_ok!(nitrokey::take().unwrap().connect_pro());
}
#[test_device]
@@ -70,7 +70,7 @@ fn connect_storage(device: Storage) {
assert_any_ok!(nitrokey::connect());
assert_any_ok!(nitrokey::take().unwrap().connect_model(nitrokey::Model::Storage));
- assert_any_ok!(nitrokey::Storage::connect());
+ assert_any_ok!(nitrokey::take().unwrap().connect_storage());
}
fn assert_empty_serial_number() {