From 6a94c70a2224212e2310927aec7b512d562ee455 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Tue, 22 Sep 2020 00:05:53 +0200 Subject: Rename *lock fields of the Config struct MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit libnitrokey calls the configuration fields that set bindings for the Num Lock, Caps Lock and Scroll Lock keys numlock, capslock, scrolllock. Due to a typo, scrolllock with three l was renamed to scrollock with two l in nitrokey-rs. To make the field names easier to read (and type) and consistent with the typical names for these keys, this patch changes them to num_lock, caps_lock and scroll_lock. In the doc comments, we now use the spelling “Num Lock”, “Caps Lock” and “Scroll Lock”. --- src/otp.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/otp.rs') diff --git a/src/otp.rs b/src/otp.rs index 1d5f507..7b47a3b 100644 --- a/src/otp.rs +++ b/src/otp.rs @@ -347,8 +347,8 @@ pub struct OtpSlotData { pub secret: String, /// The OTP generation mode. pub mode: OtpMode, - /// If true, press the enter key after sending an OTP code using double-pressed - /// numlock, capslock or scrolllock. + /// If true, press the enter key after sending an OTP code using double-pressed Num Lock, Caps + /// Lock or Scroll Lock. pub use_enter: bool, /// Set the token ID, see [OATH Token Identifier Specification][tokspec], section “Class A”. /// @@ -385,8 +385,8 @@ impl OtpSlotData { } } - /// Enables pressing the enter key after sending an OTP code using double-pressed numlock, - /// capslock or scrollock. + /// Enables pressing the enter key after sending an OTP code using double-pressed Num Lock, + /// Caps Lock or Scroll Lock. pub fn use_enter(mut self) -> OtpSlotData { self.use_enter = true; self -- cgit v1.2.1