Run latest nightly clippy

Also runs clippy on the tests and updates the CI accordingly
This commit is contained in:
Luke Parker
2023-01-01 04:18:23 -05:00
parent bff5f33616
commit 5599a052ad
23 changed files with 70 additions and 73 deletions

View File

@@ -155,7 +155,7 @@ pub fn sign<R: RngCore + CryptoRng, M: PreprocessMachine>(
machines,
|rng, machines| {
// Cache and rebuild half of the machines
let mut included = machines.keys().into_iter().cloned().collect::<Vec<_>>();
let mut included = machines.keys().cloned().collect::<Vec<_>>();
for i in included.drain(..) {
if (rng.next_u64() % 2) == 0 {
let cache = machines.remove(&i).unwrap().cache();

View File

@@ -56,7 +56,7 @@ impl From<serde_json::Value> for Vectors {
msg: to_str(&value["inputs"]["message"]),
included: to_str(&value["round_one_outputs"]["participant_list"])
.split(",")
.split(',')
.map(u16::from_str)
.collect::<Result<_, _>>()
.unwrap(),
@@ -134,7 +134,7 @@ pub fn test_with_vectors<R: RngCore + CryptoRng, C: Curve, H: Hram<C>>(
const MSG: &[u8] = b"Hello, World!";
let (mut machines, mut shares) = commit_and_shares(&mut *rng, machines, |_, _| {}, MSG);
let faulty = *shares.keys().into_iter().next().unwrap();
let faulty = *shares.keys().next().unwrap();
shares.get_mut(&faulty).unwrap().invalidate();
for (i, machine) in machines.drain() {