From 9f1e08663da3fd815ddc9ebf8033a706d3c8eb65 Mon Sep 17 00:00:00 2001 From: Niklas Adolfsson Date: Mon, 9 Jul 2018 16:48:15 +0200 Subject: [PATCH] fix warning in secret-store test (#9074) --- secret_store/src/key_server_cluster/math.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/secret_store/src/key_server_cluster/math.rs b/secret_store/src/key_server_cluster/math.rs index 66f26b508..7fbe48574 100644 --- a/secret_store/src/key_server_cluster/math.rs +++ b/secret_store/src/key_server_cluster/math.rs @@ -587,9 +587,13 @@ pub mod tests { let publics: Vec<_> = (0..n).map(|i| public_values_generation(t, &derived_point, &polynoms1[i], &polynoms2[i]).unwrap()).collect(); // keys verification - (0..n).map(|i| (0..n).map(|j| if i != j { - assert!(keys_verification(t, &derived_point, &id_numbers[i], &secrets1[j][i], &secrets2[j][i], &publics[j]).unwrap()); - }).collect::>()).collect::>(); + (0..n).for_each(|i| { + (0..n) + .filter(|&j| i != j) + .for_each(|j| { + assert!(keys_verification(t, &derived_point, &id_numbers[i], &secrets1[j][i], &secrets2[j][i], &publics[j]).unwrap()); + }) + }); // data, generated during keys generation let public_shares: Vec<_> = (0..n).map(|i| compute_public_share(&polynoms1[i][0]).unwrap()).collect();