Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
shekhirin committed Nov 16, 2023
1 parent bad45bc commit 4dc6474
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/primitives/src/integer_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl IntegerList {
/// Returns an error if the list is empty or not pre-sorted.
pub fn new<T: AsRef<[u64]>>(list: T) -> Result<Self, RoaringBitmapError> {
Ok(Self(
RoaringTreemap::from_sorted_iter(list.as_ref().into_iter().copied())
RoaringTreemap::from_sorted_iter(list.as_ref().iter().copied())
.map_err(|_| RoaringBitmapError::InvalidInput)?,
))
}
Expand All @@ -47,7 +47,7 @@ impl IntegerList {
/// Panics if the list is empty or not pre-sorted.
pub fn new_pre_sorted<T: AsRef<[u64]>>(list: T) -> Self {
Self(
RoaringTreemap::from_sorted_iter(list.as_ref().into_iter().copied())
RoaringTreemap::from_sorted_iter(list.as_ref().iter().copied())
.expect("IntegerList must be pre-sorted and non-empty"),
)
}
Expand Down Expand Up @@ -139,7 +139,7 @@ impl<'a> Arbitrary<'a> for IntegerList {
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self, arbitrary::Error> {
let mut nums: Vec<u64> = Vec::arbitrary(u)?;
nums.sort();
Ok(Self::new(nums).map_err(|_| arbitrary::Error::IncorrectFormat)?)
Self::new(nums).map_err(|_| arbitrary::Error::IncorrectFormat)
}
}

Expand Down

0 comments on commit 4dc6474

Please sign in to comment.