diff options
author | Robin Krahl <robin.krahl@ireas.org> | 2020-09-22 00:05:53 +0200 |
---|---|---|
committer | Robin Krahl <robin.krahl@ireas.org> | 2020-09-22 00:05:53 +0200 |
commit | 6a94c70a2224212e2310927aec7b512d562ee455 (patch) | |
tree | 6d205fbee84f2786abb00c1da5c7b2549e39f260 /src/auth.rs | |
parent | 5df790a77a8c81b58e7507e8da5d9ac4975a64f8 (diff) | |
download | nitrokey-rs-next.tar.gz nitrokey-rs-next.tar.bz2 |
Rename *lock fields of the Config structnext
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”.
Diffstat (limited to 'src/auth.rs')
-rw-r--r-- | src/auth.rs | 9 |
1 files changed, 5 insertions, 4 deletions
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(), |