From cea0aed29feef1d07d91670ea63cd6af45efdfee Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Mon, 28 May 2018 18:14:14 +0000 Subject: Rewrap documentation comments to 100 characters --- src/otp.rs | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) (limited to 'src/otp.rs') diff --git a/src/otp.rs b/src/otp.rs index 7145b6c..0d04e27 100644 --- a/src/otp.rs +++ b/src/otp.rs @@ -13,8 +13,8 @@ pub enum OtpMode { /// Provides methods to configure and erase OTP slots on a Nitrokey device. pub trait ConfigureOtp { - /// Configure an HOTP slot with the given data and set the HOTP counter to - /// the given value (default 0). + /// Configure an HOTP slot with the given data and set the HOTP counter to the given value + /// (default 0). /// /// # Errors /// @@ -49,8 +49,8 @@ pub trait ConfigureOtp { /// [`NoName`]: enum.CommandError.html#variant.NoName fn write_hotp_slot(&self, data: OtpSlotData, counter: u64) -> CommandStatus; - /// Configure a TOTP slot with the given data and set the TOTP time window - /// to the given value (default 30). + /// Configure a TOTP slot with the given data and set the TOTP time window to the given value + /// (default 30). /// /// # Errors /// @@ -207,9 +207,8 @@ pub trait GenerateOtp { unsafe { result_from_string(nitrokey_sys::NK_get_totp_slot_name(slot)) } } - /// Generates an HOTP code on the given slot. This operation may require - /// user authorization, depending on the device configuration (see - /// [`get_config`][]). + /// Generates an HOTP code on the given slot. This operation may require user authorization, + /// depending on the device configuration (see [`get_config`][]). /// /// # Errors /// @@ -241,12 +240,11 @@ pub trait GenerateOtp { } } - /// Generates a TOTP code on the given slot. This operation may require - /// user authorization, depending on the device configuration (see - /// [`get_config`][]). + /// Generates a TOTP code on the given slot. This operation may require user authorization, + /// depending on the device configuration (see [`get_config`][]). /// - /// To make sure that the Nitrokey’s time is in sync, consider calling - /// [`set_time`][] before calling this method. + /// To make sure that the Nitrokey’s time is in sync, consider calling [`set_time`][] before + /// calling this method. /// /// # Errors /// @@ -291,8 +289,7 @@ pub trait GenerateOtp { /// The configuration for an OTP slot. #[derive(Debug)] pub struct OtpSlotData { - /// The number of the slot – must be less than three for HOTP and less than - /// 15 for TOTP. + /// The number of the slot – must be less than three for HOTP and less than 15 for TOTP. pub number: u8, /// The name of the slot – must not be empty. pub name: String, @@ -303,8 +300,7 @@ pub struct OtpSlotData { /// If true, press the enter key after sending an OTP code using double-pressed /// numlock, capslock or scrolllock. pub use_enter: bool, - /// Set the token ID, see [OATH Token Identifier Specification][tokspec], section - /// “Class A”. + /// Set the token ID, see [OATH Token Identifier Specification][tokspec], section “Class A”. /// /// [tokspec]: https://openauthentication.org/token-specs/ pub token_id: Option, -- cgit v1.2.1