diff options
Diffstat (limited to 'src/device.rs')
-rw-r--r-- | src/device.rs | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/device.rs b/src/device.rs index 63a5654..326df5d 100644 --- a/src/device.rs +++ b/src/device.rs @@ -41,7 +41,7 @@ enum Model { /// user.device() /// }, /// Err((device, err)) => { -/// println!("Could not authenticate as user: {:?}", err); +/// println!("Could not authenticate as user: {}", err); /// device /// }, /// }; @@ -86,7 +86,7 @@ pub enum DeviceWrapper { /// user.device() /// }, /// Err((device, err)) => { -/// println!("Could not authenticate as user: {:?}", err); +/// println!("Could not authenticate as user: {}", err); /// device /// }, /// }; @@ -128,7 +128,7 @@ pub struct Pro {} /// user.device() /// }, /// Err((device, err)) => { -/// println!("Could not authenticate as user: {:?}", err); +/// println!("Could not authenticate as user: {}", err); /// device /// }, /// }; @@ -161,8 +161,8 @@ pub trait Device: Authenticate + GetPasswordSafe + GenerateOtp { /// # fn try_main() -> Result<(), CommandError> { /// let device = nitrokey::connect()?; /// match device.get_serial_number() { - /// Ok(number) => println!("serial no: {:?}", number), - /// Err(err) => println!("Could not get serial number: {:?}", err), + /// Ok(number) => println!("serial no: {}", number), + /// Err(err) => println!("Could not get serial number: {}", err), /// }; /// # Ok(()) /// # } @@ -302,7 +302,7 @@ pub trait Device: Authenticate + GetPasswordSafe + GenerateOtp { /// let device = nitrokey::connect()?; /// match device.change_admin_pin("12345678", "12345679") { /// Ok(()) => println!("Updated admin PIN."), - /// Err(err) => println!("Failed to update admin PIN: {:?}", err), + /// Err(err) => println!("Failed to update admin PIN: {}", err), /// }; /// # Ok(()) /// # } @@ -338,7 +338,7 @@ pub trait Device: Authenticate + GetPasswordSafe + GenerateOtp { /// let device = nitrokey::connect()?; /// match device.change_user_pin("123456", "123457") { /// Ok(()) => println!("Updated admin PIN."), - /// Err(err) => println!("Failed to update admin PIN: {:?}", err), + /// Err(err) => println!("Failed to update admin PIN: {}", err), /// }; /// # Ok(()) /// # } @@ -374,7 +374,7 @@ pub trait Device: Authenticate + GetPasswordSafe + GenerateOtp { /// let device = nitrokey::connect()?; /// match device.unlock_user_pin("12345678", "123456") { /// Ok(()) => println!("Unlocked user PIN."), - /// Err(err) => println!("Failed to unlock user PIN: {:?}", err), + /// Err(err) => println!("Failed to unlock user PIN: {}", err), /// }; /// # Ok(()) /// # } @@ -408,7 +408,7 @@ pub trait Device: Authenticate + GetPasswordSafe + GenerateOtp { /// let device = nitrokey::connect()?; /// match device.lock() { /// Ok(()) => println!("Locked the Nitrokey device."), - /// Err(err) => println!("Could not lock the Nitrokey device: {:?}", err), + /// Err(err) => println!("Could not lock the Nitrokey device: {}", err), /// }; /// # Ok(()) /// # } @@ -430,7 +430,7 @@ pub trait Device: Authenticate + GetPasswordSafe + GenerateOtp { /// /// match nitrokey::connect() { /// Ok(device) => do_something(device), -/// Err(err) => println!("Could not connect to a Nitrokey: {:?}", err), +/// Err(err) => println!("Could not connect to a Nitrokey: {}", err), /// } /// ``` pub fn connect() -> Result<DeviceWrapper, CommandError> { @@ -537,7 +537,7 @@ impl Storage { /// let device = nitrokey::Storage::connect()?; /// match device.enable_encrypted_volume("123456") { /// Ok(()) => println!("Enabled the encrypted volume."), - /// Err(err) => println!("Could not enable the encrypted volume: {:?}", err), + /// Err(err) => println!("Could not enable the encrypted volume: {}", err), /// }; /// # Ok(()) /// # } @@ -571,11 +571,11 @@ impl Storage { /// match device.disable_encrypted_volume() { /// Ok(()) => println!("Disabled the encrypted volume."), /// Err(err) => { - /// println!("Could not disable the encrypted volume: {:?}", err); + /// println!("Could not disable the encrypted volume: {}", err); /// }, /// }; /// }, - /// Err(err) => println!("Could not enable the encrypted volume: {:?}", err), + /// Err(err) => println!("Could not enable the encrypted volume: {}", err), /// }; /// # Ok(()) /// # } |