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/device/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/device/mod.rs') diff --git a/src/device/mod.rs b/src/device/mod.rs index fbf336d..7fec18b 100644 --- a/src/device/mod.rs +++ b/src/device/mod.rs @@ -464,9 +464,9 @@ pub trait Device<'a>: Authenticate<'a> + GetPasswordSafe<'a> + GenerateOtp + fmt /// let mut manager = nitrokey::take()?; /// let device = manager.connect()?; /// let config = device.get_config()?; - /// println!("numlock binding: {:?}", config.numlock); - /// println!("capslock binding: {:?}", config.capslock); - /// println!("scrollock binding: {:?}", config.scrollock); + /// println!("Num Lock binding: {:?}", config.num_lock); + /// println!("Caps Lock binding: {:?}", config.caps_lock); + /// println!("Scroll Lock binding: {:?}", config.scroll_lock); /// println!("require password for OTP: {:?}", config.user_password); /// # Ok(()) /// # } -- cgit v1.2.1