aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2018-12-16 15:45:09 +0000
committerRobin Krahl <robin.krahl@ireas.org>2018-12-16 17:04:20 +0100
commit7f0c2e550d0439d0311da71806e19f893725b40b (patch)
tree9c27b3721df790994f4933ee5ed99139e5c2973d /src
parent7d64de856294a21fa3da560aefbff12271fb0146 (diff)
downloadnitrokey-rs-7f0c2e550d0439d0311da71806e19f893725b40b.tar.gz
nitrokey-rs-7f0c2e550d0439d0311da71806e19f893725b40b.tar.bz2
Fix examples for {Pro, Storage}::connect()
Diffstat (limited to 'src')
-rw-r--r--src/device.rs14
1 files 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<Storage, CommandError> {