summaryrefslogtreecommitdiff
path: root/nitrokey/src/auth.rs
diff options
context:
space:
mode:
Diffstat (limited to 'nitrokey/src/auth.rs')
-rw-r--r--nitrokey/src/auth.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/nitrokey/src/auth.rs b/nitrokey/src/auth.rs
index 017cdbb..a129bd8 100644
--- a/nitrokey/src/auth.rs
+++ b/nitrokey/src/auth.rs
@@ -149,10 +149,7 @@ where
A: AuthenticatedDevice<D>,
T: Fn(*const i8, *const i8) -> c_int,
{
- let temp_password = match generate_password(TEMPORARY_PASSWORD_LENGTH) {
- Ok(pw) => pw,
- Err(_) => return Err((device, CommandError::RngError)),
- };
+ let temp_password = generate_password(TEMPORARY_PASSWORD_LENGTH);
let password = match get_cstring(password) {
Ok(password) => password,
Err(err) => return Err((device, err)),