Fix some clippy lint warnings

This commit is contained in:
Valentin Tolmer
2021-06-15 12:59:36 -07:00
committed by Kevin Lewi
parent 2c7fe4e382
commit cd85efc603
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -422,7 +422,7 @@ fn generate_parameters<CS: CipherSuite>() -> TestVectorParameters {
server_registration_state,
client_login_state,
server_login_state,
session_key: client_login_finish_result.session_key.clone(),
session_key: client_login_finish_result.session_key,
export_key: client_registration_finish_result.export_key.to_vec(),
}
}
+4 -4
View File
@@ -285,20 +285,20 @@ fn rfc_to_json(input: &str) -> String {
let mut json = vec![];
for line in input.lines() {
// If line contains colon, then
if line.contains(":") {
if json.len() > 0 {
if line.contains(':') {
if !json.is_empty() {
// Adding closing quote for previous line, comma, and newline
json.push("\",\n".to_string());
}
let mut iter = line.split(":");
let mut iter = line.split(':');
let key = iter.next().unwrap().split_whitespace().next().unwrap();
let val = iter.next().unwrap().split_whitespace().next().unwrap();
json.push(format!(" \"{}\": \"{}", key, val));
} else {
let s = line.trim().to_string();
if s.len() > 0 {
if !s.is_empty() {
json.push(s);
}
}
+1 -1
View File
@@ -21,7 +21,7 @@ struct VOPRFTestVectorParameters {
// Taken from https://github.com/cfrg/draft-irtf-cfrg-voprf/blob/master/draft-irtf-cfrg-voprf.md
// in base mode
static OPRF_RISTRETTO255_SHA512: &'static [&str] = &[
static OPRF_RISTRETTO255_SHA512: &[&str] = &[
r#"
{
"sksm": "758cbac0e1eb4265d80f6e6489d9a74d788f7ddeda67d7fb3c08b08f44bda30a",