Fix some clippy lint warnings
This commit is contained in:
committed by
Kevin Lewi
parent
2c7fe4e382
commit
cd85efc603
@@ -422,7 +422,7 @@ fn generate_parameters<CS: CipherSuite>() -> TestVectorParameters {
|
|||||||
server_registration_state,
|
server_registration_state,
|
||||||
client_login_state,
|
client_login_state,
|
||||||
server_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(),
|
export_key: client_registration_finish_result.export_key.to_vec(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -285,20 +285,20 @@ fn rfc_to_json(input: &str) -> String {
|
|||||||
let mut json = vec![];
|
let mut json = vec![];
|
||||||
for line in input.lines() {
|
for line in input.lines() {
|
||||||
// If line contains colon, then
|
// If line contains colon, then
|
||||||
if line.contains(":") {
|
if line.contains(':') {
|
||||||
if json.len() > 0 {
|
if !json.is_empty() {
|
||||||
// Adding closing quote for previous line, comma, and newline
|
// Adding closing quote for previous line, comma, and newline
|
||||||
json.push("\",\n".to_string());
|
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 key = iter.next().unwrap().split_whitespace().next().unwrap();
|
||||||
let val = iter.next().unwrap().split_whitespace().next().unwrap();
|
let val = iter.next().unwrap().split_whitespace().next().unwrap();
|
||||||
|
|
||||||
json.push(format!(" \"{}\": \"{}", key, val));
|
json.push(format!(" \"{}\": \"{}", key, val));
|
||||||
} else {
|
} else {
|
||||||
let s = line.trim().to_string();
|
let s = line.trim().to_string();
|
||||||
if s.len() > 0 {
|
if !s.is_empty() {
|
||||||
json.push(s);
|
json.push(s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ struct VOPRFTestVectorParameters {
|
|||||||
|
|
||||||
// Taken from https://github.com/cfrg/draft-irtf-cfrg-voprf/blob/master/draft-irtf-cfrg-voprf.md
|
// Taken from https://github.com/cfrg/draft-irtf-cfrg-voprf/blob/master/draft-irtf-cfrg-voprf.md
|
||||||
// in base mode
|
// in base mode
|
||||||
static OPRF_RISTRETTO255_SHA512: &'static [&str] = &[
|
static OPRF_RISTRETTO255_SHA512: &[&str] = &[
|
||||||
r#"
|
r#"
|
||||||
{
|
{
|
||||||
"sksm": "758cbac0e1eb4265d80f6e6489d9a74d788f7ddeda67d7fb3c08b08f44bda30a",
|
"sksm": "758cbac0e1eb4265d80f6e6489d9a74d788f7ddeda67d7fb3c08b08f44bda30a",
|
||||||
|
|||||||
Reference in New Issue
Block a user