Fixed some clippy lints and changed update_uuid_revision to only use one db query

This commit is contained in:
Daniel García
2019-02-08 18:45:07 +01:00
parent ef63342e20
commit 8b4a6f2a64
8 changed files with 32 additions and 27 deletions

View File

@@ -462,7 +462,7 @@ pub fn validate_u2f_login(user_uuid: &str, response: &str, conn: &DbConn) -> Emp
}
Err(e) => {
info!("E {:#}", e);
break;
// break;
}
}
}
@@ -494,7 +494,7 @@ use yubico::Yubico;
fn parse_yubikeys(data: &EnableYubikeyData) -> Vec<String> {
let data_keys = [&data.Key1, &data.Key2, &data.Key3, &data.Key4, &data.Key5];
data_keys.into_iter().filter_map(|e| e.as_ref().cloned()).collect()
data_keys.iter().filter_map(|e| e.as_ref().cloned()).collect()
}
fn jsonify_yubikeys(yubikeys: Vec<String>) -> serde_json::Value {