From 7c3ddd9de806e3e6f130675f21d1a8d918900cd5 Mon Sep 17 00:00:00 2001 From: Hendrik Eeckhaut Date: Wed, 19 Jul 2023 11:20:39 +0200 Subject: [PATCH] Fixed clippy warnings #24 --- mpz-circuits/src/ops/uint.rs | 2 +- ot/mpz-ot-core/src/extension/kos15/sender/mod.rs | 6 +++--- ot/mpz-ot/src/kos/receiver.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mpz-circuits/src/ops/uint.rs b/mpz-circuits/src/ops/uint.rs index 4395b05d..8f852331 100644 --- a/mpz-circuits/src/ops/uint.rs +++ b/mpz-circuits/src/ops/uint.rs @@ -142,7 +142,7 @@ impl<'a> BitXor for Tracer<'a, BinaryRepr> { self.state, BinaryRepr::Array( a.into_iter() - .zip(b.into_iter()) + .zip(b) .map(|(a, b)| { let c = Tracer::new(self.state, a) ^ Tracer::new(self.state, b); c.value diff --git a/ot/mpz-ot-core/src/extension/kos15/sender/mod.rs b/ot/mpz-ot-core/src/extension/kos15/sender/mod.rs index 49e5a263..6ab77beb 100644 --- a/ot/mpz-ot-core/src/extension/kos15/sender/mod.rs +++ b/ot/mpz-ot-core/src/extension/kos15/sender/mod.rs @@ -179,7 +179,7 @@ impl Kos15Sender { impl Kos15Sender { pub fn send(&mut self, inputs: &[[Block; 2]]) -> Result { send_from( - &mut self.0.count, + &self.0.count, &mut self.0.sent, &mut self.0.table, &self.0.base_choices, @@ -216,7 +216,7 @@ impl Kos15Sender { derandomize: ExtDerandomize, ) -> Result { send_from( - &mut self.0.count, + &self.0.count, &mut self.0.sent, &mut self.0.table, &self.0.base_choices, @@ -273,7 +273,7 @@ impl Kos15Sender { } fn send_from( - count: &mut usize, + count: &usize, sent: &mut usize, table: &mut KosMatrix, base_choices: &[bool], diff --git a/ot/mpz-ot/src/kos/receiver.rs b/ot/mpz-ot/src/kos/receiver.rs index 285145b2..bc61dd2c 100644 --- a/ot/mpz-ot/src/kos/receiver.rs +++ b/ot/mpz-ot/src/kos/receiver.rs @@ -139,7 +139,7 @@ impl ObliviousReceiveOwned let mut plaintext: Vec<[Block; N]> = Vec::with_capacity(choices.len()); for ((key, choice), msgs) in keys .iter() - .zip(choices.into_iter()) + .zip(choices) .zip(ciphertexts.chunks_exact(2 * N * Block::LEN)) { let cipher = Aes128::new(&key.to_be_bytes().into());