Skip to content

Commit

Permalink
clippy fixes for rust 1.72
Browse files Browse the repository at this point in the history
  • Loading branch information
nmandery committed Aug 31, 2023
1 parent ce2024c commit d0d24a0
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/algorithm/grid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ where
offsets.push(grid_cells.len() as i64);
let offsets: OffsetsBuffer<i64> = offsets.try_into()?;
let list_validity = {
let validity: Bitmap = MutableBitmap::from_iter(list_validity.into_iter()).into();
let validity: Bitmap = MutableBitmap::from_iter(list_validity).into();
if validity.unset_bits() == 0 {
None
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/array/from_geo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ fn to_cells(
options: &ToCellsOptions,
mut acc: Vec<CellIndex>,
) -> Result<Vec<CellIndex>, Error> {
acc.extend(geometry_to_cells(&geom, options)?.into_iter());
acc.extend(geometry_to_cells(&geom, options)?);
Ok(acc)
}

Expand Down
2 changes: 1 addition & 1 deletion src/array/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ impl<T: NativeType> ListArrayBuilder<T> {

pub fn build(mut self) -> Result<ListArray<i64>, Error> {
self.offsets.push(self.values.len() as i64);
let validity: Bitmap = MutableBitmap::from_iter(self.list_validity.into_iter()).into();
let validity: Bitmap = MutableBitmap::from_iter(self.list_validity).into();
Ok(ListArray::try_new(
ListArray::<i64>::default_datatype(DataType::UInt64),
self.offsets.try_into()?,
Expand Down
8 changes: 4 additions & 4 deletions src/array/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ where
IX: H3IndexArrayValue,
{
fn from(value: Vec<IX>) -> Self {
Self::from_iter(value.into_iter())
Self::from_iter(value)
}
}

Expand All @@ -164,7 +164,7 @@ where
IX: H3IndexArrayValue,
{
fn from(value: Vec<Option<IX>>) -> Self {
Self::from_iter(value.into_iter())
Self::from_iter(value)
}
}

Expand Down Expand Up @@ -234,7 +234,7 @@ where
IX: H3IndexArrayValue,
{
fn from_with_validity(value: Vec<u64>) -> Self {
Self::from_iter_with_validity(value.into_iter())
Self::from_iter_with_validity(value)
}
}

Expand All @@ -243,7 +243,7 @@ where
IX: H3IndexArrayValue,
{
fn from_with_validity(value: Vec<Option<u64>>) -> Self {
Self::from_iter_with_validity(value.into_iter())
Self::from_iter_with_validity(value)
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/array/resolution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,13 @@ impl FromIterator<Option<Resolution>> for ResolutionArray {

impl From<Vec<Resolution>> for ResolutionArray {
fn from(value: Vec<Resolution>) -> Self {
Self::from_iter(value.into_iter())
Self::from_iter(value)
}
}

impl From<Vec<Option<Resolution>>> for ResolutionArray {
fn from(value: Vec<Option<Resolution>>) -> Self {
Self::from_iter(value.into_iter())
Self::from_iter(value)
}
}

Expand Down Expand Up @@ -139,12 +139,12 @@ impl FromIteratorWithValidity<Option<u8>> for ResolutionArray {

impl FromWithValidity<Vec<u8>> for ResolutionArray {
fn from_with_validity(value: Vec<u8>) -> Self {
Self::from_iter_with_validity(value.into_iter())
Self::from_iter_with_validity(value)
}
}

impl FromWithValidity<Vec<Option<u8>>> for ResolutionArray {
fn from_with_validity(value: Vec<Option<u8>>) -> Self {
Self::from_iter_with_validity(value.into_iter())
Self::from_iter_with_validity(value)
}
}
4 changes: 2 additions & 2 deletions src/array/validity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ where
T: FromIteratorWithValidity<u64>,
{
fn from_with_validity(value: Vec<u64>) -> Self {
Self::from_iter_with_validity(value.into_iter())
Self::from_iter_with_validity(value)
}
}

Expand All @@ -26,7 +26,7 @@ where
T: FromIteratorWithValidity<Option<u64>>,
{
fn from_with_validity(value: Vec<Option<u64>>) -> Self {
Self::from_iter_with_validity(value.into_iter())
Self::from_iter_with_validity(value)
}
}

Expand Down

0 comments on commit d0d24a0

Please sign in to comment.