aboutsummaryrefslogtreecommitdiff
path: root/src/otp.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/otp.rs')
-rw-r--r--src/otp.rs28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/otp.rs b/src/otp.rs
index e43b1c8..00a5e5e 100644
--- a/src/otp.rs
+++ b/src/otp.rs
@@ -35,10 +35,10 @@ pub trait ConfigureOtp {
/// Ok(admin) => {
/// match admin.write_hotp_slot(slot_data, 0) {
/// Ok(()) => println!("Successfully wrote slot."),
- /// Err(err) => println!("Could not write slot: {:?}", err),
+ /// Err(err) => println!("Could not write slot: {}", err),
/// }
/// },
- /// Err((_, err)) => println!("Could not authenticate as admin: {:?}", err),
+ /// Err((_, err)) => println!("Could not authenticate as admin: {}", err),
/// }
/// # Ok(())
/// # }
@@ -71,10 +71,10 @@ pub trait ConfigureOtp {
/// Ok(admin) => {
/// match admin.write_totp_slot(slot_data, 30) {
/// Ok(()) => println!("Successfully wrote slot."),
- /// Err(err) => println!("Could not write slot: {:?}", err),
+ /// Err(err) => println!("Could not write slot: {}", err),
/// }
/// },
- /// Err((_, err)) => println!("Could not authenticate as admin: {:?}", err),
+ /// Err((_, err)) => println!("Could not authenticate as admin: {}", err),
/// }
/// # Ok(())
/// # }
@@ -103,10 +103,10 @@ pub trait ConfigureOtp {
/// Ok(admin) => {
/// match admin.erase_hotp_slot(1) {
/// Ok(()) => println!("Successfully erased slot."),
- /// Err(err) => println!("Could not erase slot: {:?}", err),
+ /// Err(err) => println!("Could not erase slot: {}", err),
/// }
/// },
- /// Err((_, err)) => println!("Could not authenticate as admin: {:?}", err),
+ /// Err((_, err)) => println!("Could not authenticate as admin: {}", err),
/// }
/// # Ok(())
/// # }
@@ -133,10 +133,10 @@ pub trait ConfigureOtp {
/// Ok(admin) => {
/// match admin.erase_totp_slot(1) {
/// Ok(()) => println!("Successfully erased slot."),
- /// Err(err) => println!("Could not erase slot: {:?}", err),
+ /// Err(err) => println!("Could not erase slot: {}", err),
/// }
/// },
- /// Err((_, err)) => println!("Could not authenticate as admin: {:?}", err),
+ /// Err((_, err)) => println!("Could not authenticate as admin: {}", err),
/// }
/// # Ok(())
/// # }
@@ -200,9 +200,9 @@ pub trait GenerateOtp {
/// # fn try_main() -> Result<(), CommandError> {
/// let device = nitrokey::connect()?;
/// match device.get_hotp_slot_name(1) {
- /// Ok(name) => println!("HOTP slot 1: {:?}", name),
+ /// Ok(name) => println!("HOTP slot 1: {}", name),
/// Err(CommandError::SlotNotProgrammed) => println!("HOTP slot 1 not programmed"),
- /// Err(err) => println!("Could not get slot name: {:?}", err),
+ /// Err(err) => println!("Could not get slot name: {}", err),
/// };
/// # Ok(())
/// # }
@@ -229,9 +229,9 @@ pub trait GenerateOtp {
/// # fn try_main() -> Result<(), CommandError> {
/// let device = nitrokey::connect()?;
/// match device.get_totp_slot_name(1) {
- /// Ok(name) => println!("TOTP slot 1: {:?}", name),
+ /// Ok(name) => println!("TOTP slot 1: {}", name),
/// Err(CommandError::SlotNotProgrammed) => println!("TOTP slot 1 not programmed"),
- /// Err(err) => println!("Could not get slot name: {:?}", err),
+ /// Err(err) => println!("Could not get slot name: {}", err),
/// };
/// # Ok(())
/// # }
@@ -261,7 +261,7 @@ pub trait GenerateOtp {
/// # fn try_main() -> Result<(), CommandError> {
/// let device = nitrokey::connect()?;
/// let code = device.get_hotp_code(1)?;
- /// println!("Generated HOTP code on slot 1: {:?}", code);
+ /// println!("Generated HOTP code on slot 1: {}", code);
/// # Ok(())
/// # }
/// ```
@@ -304,7 +304,7 @@ pub trait GenerateOtp {
/// } else {
/// device.set_time(time as u64);
/// let code = device.get_totp_code(1)?;
- /// println!("Generated TOTP code on slot 1: {:?}", code);
+ /// println!("Generated TOTP code on slot 1: {}", code);
/// }
/// # Ok(())
/// # }