summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/auth.rs4
-rw-r--r--src/device.rs4
-rw-r--r--src/lib.rs11
-rw-r--r--src/pws.rs4
-rw-r--r--tests/otp.rs4
-rw-r--r--tests/pws.rs2
6 files changed, 17 insertions, 12 deletions
diff --git a/src/auth.rs b/src/auth.rs
index ef39777..017cdbb 100644
--- a/src/auth.rs
+++ b/src/auth.rs
@@ -6,7 +6,9 @@ use nitrokey_sys;
use crate::config::{Config, RawConfig};
use crate::device::{Device, DeviceWrapper, Pro, Storage};
use crate::otp::{ConfigureOtp, GenerateOtp, OtpMode, OtpSlotData, RawOtpSlotData};
-use crate::util::{generate_password, get_command_result, get_cstring, result_from_string, CommandError};
+use crate::util::{
+ generate_password, get_command_result, get_cstring, result_from_string, CommandError,
+};
static TEMPORARY_PASSWORD_LENGTH: usize = 25;
diff --git a/src/device.rs b/src/device.rs
index 1f9ae3d..5dc6724 100644
--- a/src/device.rs
+++ b/src/device.rs
@@ -7,7 +7,9 @@ use crate::auth::Authenticate;
use crate::config::{Config, RawConfig};
use crate::otp::GenerateOtp;
use crate::pws::GetPasswordSafe;
-use crate::util::{get_command_result, get_cstring, get_last_error, result_from_string, CommandError};
+use crate::util::{
+ get_command_result, get_cstring, get_last_error, result_from_string, CommandError,
+};
/// Available Nitrokey models.
#[derive(Clone, Copy, Debug, PartialEq)]
diff --git a/src/lib.rs b/src/lib.rs
index 37f839a..9f21518 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -84,12 +84,7 @@
//! [`DeviceWrapper`]: enum.DeviceWrapper.html
//! [`User`]: struct.User.html
-#![warn(
- missing_docs,
- rust_2018_compatibility,
- rust_2018_idioms,
- unused,
-)]
+#![warn(missing_docs, rust_2018_compatibility, rust_2018_idioms, unused)]
mod auth;
mod config;
@@ -102,7 +97,9 @@ use nitrokey_sys;
pub use crate::auth::{Admin, Authenticate, User};
pub use crate::config::Config;
-pub use crate::device::{connect, Device, DeviceWrapper, Model, Pro, Storage, StorageStatus, VolumeStatus};
+pub use crate::device::{
+ connect, Device, DeviceWrapper, Model, Pro, Storage, StorageStatus, VolumeStatus,
+};
pub use crate::otp::{ConfigureOtp, GenerateOtp, OtpMode, OtpSlotData};
pub use crate::pws::{GetPasswordSafe, PasswordSafe, SLOT_COUNT};
pub use crate::util::{CommandError, LogLevel};
diff --git a/src/pws.rs b/src/pws.rs
index c95b63b..08ac365 100644
--- a/src/pws.rs
+++ b/src/pws.rs
@@ -2,7 +2,9 @@ use libc;
use nitrokey_sys;
use crate::device::{Device, DeviceWrapper, Pro, Storage};
-use crate::util::{get_command_result, get_cstring, get_last_error, result_from_string, CommandError};
+use crate::util::{
+ get_command_result, get_cstring, get_last_error, result_from_string, CommandError,
+};
/// The number of slots in a [`PasswordSafe`][].
///
diff --git a/tests/otp.rs b/tests/otp.rs
index 03feb48..8e7ae08 100644
--- a/tests/otp.rs
+++ b/tests/otp.rs
@@ -2,7 +2,9 @@ mod util;
use std::ops::Deref;
-use nitrokey::{Admin, Authenticate, CommandError, Config, ConfigureOtp, GenerateOtp, OtpMode, OtpSlotData};
+use nitrokey::{
+ Admin, Authenticate, CommandError, Config, ConfigureOtp, GenerateOtp, OtpMode, OtpSlotData,
+};
use crate::util::{Target, ADMIN_PASSWORD, USER_PASSWORD};
diff --git a/tests/pws.rs b/tests/pws.rs
index 69ad664..875324b 100644
--- a/tests/pws.rs
+++ b/tests/pws.rs
@@ -22,7 +22,7 @@ fn get_slot_name_direct(slot: u8) -> Result<String, CommandError> {
0 => Err(CommandError::Unknown),
other => Err(CommandError::from(other)),
}
- },
+ }
false => Ok(s),
}
}