From 248f8b209b0150e70e82ab15b73bf32b0f47341d Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Thu, 3 Jan 2019 00:23:13 +0000 Subject: Remove CommandError::RngError We switched to rand::thread_rng() which cannot fail. Therefore the CommandError::RngError is no longer needed and removed in this patch. --- src/auth.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/auth.rs') diff --git a/src/auth.rs b/src/auth.rs index 017cdbb..a129bd8 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -149,10 +149,7 @@ where A: AuthenticatedDevice, 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)), -- cgit v1.2.1