From 7f0c2e550d0439d0311da71806e19f893725b40b Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Sun, 16 Dec 2018 15:45:09 +0000 Subject: Fix examples for {Pro, Storage}::connect() --- src/device.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/device.rs b/src/device.rs index 86dcc58..1455a57 100644 --- a/src/device.rs +++ b/src/device.rs @@ -571,12 +571,12 @@ impl Pro { /// # Example /// /// ``` - /// use nitrokey::DeviceWrapper; + /// use nitrokey::Pro; /// /// fn use_pro(device: Pro) {} /// - /// match nitrokey::connect() { - /// Ok(device) => do_something(device), + /// match nitrokey::Pro::connect() { + /// Ok(device) => use_pro(device), /// Err(err) => println!("Could not connect to the Nitrokey Pro: {}", err), /// } /// ``` @@ -607,13 +607,13 @@ impl Storage { /// # Example /// /// ``` - /// use nitrokey::DeviceWrapper; + /// use nitrokey::Storage; /// /// fn use_storage(device: Storage) {} /// - /// match nitrokey::connect() { - /// Ok(device) => do_something(device), - /// Err(err) => println!("Could not connect to the Nitrokey Pro: {}", err), + /// match nitrokey::Storage::connect() { + /// Ok(device) => use_storage(device), + /// Err(err) => println!("Could not connect to the Nitrokey Storage: {}", err), /// } /// ``` pub fn connect() -> Result { -- cgit v1.2.1