Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
Fixed clippy for 1.60
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgecarleitao committed Sep 25, 2022
1 parent e972df0 commit cef2ec1
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/array/binary/mutable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ impl<O: Offset> MutableBinaryArray<O> {
let value = self.values.split_off(value_start);
self.validity
.as_mut()
.map(|x| x.pop()?.then(|| ()))
.map(|x| x.pop()?.then_some(()))
.unwrap_or_else(|| Some(()))
.map(|_| value)
}
Expand Down
2 changes: 1 addition & 1 deletion src/array/boolean/mutable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ impl MutableBooleanArray {
let value = self.values.pop()?;
self.validity
.as_mut()
.map(|x| x.pop()?.then(|| value))
.map(|x| x.pop()?.then_some(value))
.unwrap_or_else(|| Some(value))
}

Expand Down
2 changes: 1 addition & 1 deletion src/array/fixed_size_binary/mutable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ impl MutableFixedSizeBinaryArray {
let value = self.values.split_off(value_start);
self.validity
.as_mut()
.map(|x| x.pop()?.then(|| ()))
.map(|x| x.pop()?.then_some(()))
.unwrap_or_else(|| Some(()))
.map(|_| value)
}
Expand Down
2 changes: 1 addition & 1 deletion src/array/primitive/mutable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ impl<T: NativeType> MutablePrimitiveArray<T> {
let value = self.values.pop()?;
self.validity
.as_mut()
.map(|x| x.pop()?.then(|| value))
.map(|x| x.pop()?.then_some(value))
.unwrap_or_else(|| Some(value))
}

Expand Down
2 changes: 1 addition & 1 deletion src/array/utf8/mutable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ impl<O: Offset> MutableUtf8Array<O> {
let value = self.values.split_off(value_start);
self.validity
.as_mut()
.map(|x| x.pop()?.then(|| ()))
.map(|x| x.pop()?.then_some(()))
.unwrap_or_else(|| Some(()))
.map(|_|
// soundness: we always check for utf8 soundness on constructors.
Expand Down
2 changes: 1 addition & 1 deletion src/io/parquet/write/dictionary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ fn serialize_keys_values<K: DictionaryKey>(
// discard indices whose values are null.
let keys = keys
.zip(validity.iter())
.filter_map(|(key, is_valid)| is_valid.then(|| key));
.filter_map(|(key, is_valid)| is_valid.then_some(key));
let num_bits = utils::get_bit_width(keys.clone().max().unwrap_or(0) as u64);

let keys = utils::ExactSizedIter::new(keys, array.len() - validity.unset_bits());
Expand Down

0 comments on commit cef2ec1

Please sign in to comment.