Skip to content

Commit

Permalink
Merge pull request #906 from akoshelev/rust-175
Browse files Browse the repository at this point in the history
Fix Rust 1.75 clippy errors
  • Loading branch information
akoshelev authored Dec 28, 2023
2 parents 9045800 + 5b7fcb8 commit 3c5d48b
Show file tree
Hide file tree
Showing 12 changed files with 45 additions and 619 deletions.
2 changes: 1 addition & 1 deletion ipa-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "ipa-core"
version = "0.1.0"
rust-version = "1.64.0"
rust-version = "1.75.0"
edition = "2021"

[features]
Expand Down
14 changes: 4 additions & 10 deletions ipa-core/src/ff/boolean_array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,15 +304,9 @@ macro_rules! boolean_array_impl {
}
}

impl<'a> IntoIterator for &'a $name {
type Item = Boolean;
type IntoIter = BAIterator<'a>;

fn into_iter(self) -> Self::IntoIter {
self.iter()
}
}

/// `clippy` does not recognize `iter` method coming from another trait. It is a false alarm
/// therefore suppressed here.
#[allow(clippy::into_iter_without_iter)]
impl<'a> IntoIterator for &'a AdditiveShare<$name> {
type Item = AdditiveShare<Boolean>;
type IntoIter = ASIterator<BAIterator<'a>>;
Expand Down Expand Up @@ -352,7 +346,7 @@ macro_rules! boolean_array_impl {
#[test]
fn iterate_boolean_array() {
let bits = ONE;
let iter = bits.into_iter();
let iter = bits.iter();
for (i, j) in iter.enumerate() {
if i == 0 {
assert_eq!(j, Boolean::ONE);
Expand Down
4 changes: 1 addition & 3 deletions ipa-core/src/helpers/buffers/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
mod ordering_mpsc;
mod ordering_sender;
mod unordered_receiver;

pub use ordering_mpsc::{ordering_mpsc, OrderingMpscReceiver, OrderingMpscSender};
pub use ordering_sender::{OrderedStream, OrderingSender};
pub use ordering_sender::OrderingSender;
pub use unordered_receiver::UnorderedReceiver;
Loading

0 comments on commit 3c5d48b

Please sign in to comment.