summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs25
1 files changed, 11 insertions, 14 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 03ef1ea..41603a0 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -14,12 +14,10 @@
//! device that can perform operations that require authentication. You can use [`device`][] to go
//! back to the unauthenticated device.
//!
-//! This makes sure that you can only execute a command if you have the
-//! required access rights. Otherwise, your code will not compile. The only
-//! exception are the methods to generate one-time passwords –
-//! [`get_hotp_code`][] and [`get_totp_code`][]. Depending on the stick
-//! configuration, these operations are available without authentication or
-//! with user authentication.
+//! This makes sure that you can only execute a command if you have the required access rights.
+//! Otherwise, your code will not compile. The only exception are the methods to generate one-time
+//! passwords – [`get_hotp_code`][] and [`get_totp_code`][]. Depending on the stick configuration,
+//! these operations are available without authentication or with user authentication.
//!
//! # Examples
//!
@@ -103,12 +101,12 @@ pub use misc::Authenticate;
pub use otp::{ConfigureOtp, GenerateOtp, OtpMode, OtpSlotData};
pub use util::{CommandError, CommandStatus, LogLevel};
-/// Enables or disables debug output. Calling this method with `true` is
-/// equivalent to setting the log level to `Debug`; calling it with `false` is
-/// equivalent to the log level `Error` (see [`set_log_level`][]).
+/// Enables or disables debug output. Calling this method with `true` is equivalent to setting the
+/// log level to `Debug`; calling it with `false` is equivalent to the log level `Error` (see
+/// [`set_log_level`][]).
///
-/// If debug output is enabled, detailed information about the communication
-/// with the Nitrokey device is printed to the standard output.
+/// If debug output is enabled, detailed information about the communication with the Nitrokey
+/// device is printed to the standard output.
///
/// [`set_log_level`]: fn.set_log_level.html
pub fn set_debug(state: bool) {
@@ -117,9 +115,8 @@ pub fn set_debug(state: bool) {
}
}
-/// Sets the log level for libnitrokey. All log messages are written to the
-/// standard error stream. Setting the log level enables all log messages on
-/// the same or on a higher log level.
+/// Sets the log level for libnitrokey. All log messages are written to the standard error stream.
+/// Setting the log level enables all log messages on the same or on a higher log level.
pub fn set_log_level(level: LogLevel) {
unsafe {
nitrokey_sys::NK_set_debug_level(level.into());