From 2a736067581dd44288b43a01bf47e0d28801e0a8 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Mon, 21 May 2018 23:27:55 +0000 Subject: Correct formatting --- src/lib.rs | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index 53b0c6c..235c81b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -616,7 +616,7 @@ pub trait Device { /// Changes the administrator PIN. /// /// # Errors - /// + /// /// - [`InvalidString`][] if one of the provided passwords contains a null byte /// - [`WrongPassword`][] if the current admin password is wrong /// @@ -646,13 +646,18 @@ pub trait Device { } let current_string = current_string.unwrap(); let new_string = new_string.unwrap(); - unsafe { CommandStatus::from(nitrokey_sys::NK_change_admin_PIN(current_string.as_ptr(), new_string.as_ptr())) } + unsafe { + CommandStatus::from(nitrokey_sys::NK_change_admin_PIN( + current_string.as_ptr(), + new_string.as_ptr(), + )) + } } /// Changes the user PIN. /// /// # Errors - /// + /// /// - [`InvalidString`][] if one of the provided passwords contains a null byte /// - [`WrongPassword`][] if the current user password is wrong /// @@ -682,7 +687,12 @@ pub trait Device { } let current_string = current_string.unwrap(); let new_string = new_string.unwrap(); - unsafe { CommandStatus::from(nitrokey_sys::NK_change_user_PIN(current_string.as_ptr(), new_string.as_ptr())) } + unsafe { + CommandStatus::from(nitrokey_sys::NK_change_user_PIN( + current_string.as_ptr(), + new_string.as_ptr(), + )) + } } } @@ -1088,7 +1098,9 @@ impl UnauthenticatedDevice { impl Drop for UnauthenticatedDevice { fn drop(&mut self) { - unsafe { nitrokey_sys::NK_logout(); } + unsafe { + nitrokey_sys::NK_logout(); + } } } -- cgit v1.2.1