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/auth.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/auth.rs') diff --git a/src/auth.rs b/src/auth.rs index 9cf0722..5ca59da 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -278,7 +278,8 @@ impl<'a, T: Device<'a>> Admin<'a, T> { /// /// # Errors /// - /// - [`InvalidSlot`][] if the provided numlock, capslock or scrolllock slot is larger than two + /// - [`InvalidSlot`][] if the provided Num Lock, Caps Lock or Scroll Lock slot is larger than + /// two /// /// # Example /// @@ -306,9 +307,9 @@ impl<'a, T: Device<'a>> Admin<'a, T> { let raw_config = RawConfig::try_from(config)?; get_command_result(unsafe { nitrokey_sys::NK_write_config( - raw_config.numlock, - raw_config.capslock, - raw_config.scrollock, + raw_config.num_lock, + raw_config.caps_lock, + raw_config.scroll_lock, raw_config.user_password, false, self.temp_password.as_ptr(), -- cgit v1.2.1