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

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
b41sh committed Nov 9, 2023
1 parent 976ada2 commit 7751abe
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl Service {
.get_bin("auth-token-bin")
.and_then(|v| v.to_bytes().ok())
.and_then(|b| String::from_utf8(b.to_vec()).ok())
.and_then(|username| (username == AUTH_USERNAME).then(|| AUTH_USERNAME.to_string()))
.and_then(|username| (username == AUTH_USERNAME).then_some(AUTH_USERNAME.to_string()))
.ok_or_else(|| Status::unauthenticated("Invalid token"))
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/array/boolean/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ impl IntoIterator for BooleanArray {
fn into_iter(self) -> Self::IntoIter {
let (_, values, validity) = self.into_inner();
let values = values.into_iter();
let validity =
validity.and_then(|validity| (validity.unset_bits() > 0).then_some(validity.into_iter()));
let validity = validity
.and_then(|validity| (validity.unset_bits() > 0).then_some(validity.into_iter()));
ZipValidity::new(values, validity)
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/array/primitive/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ impl<T: NativeType> IntoIterator for PrimitiveArray<T> {
fn into_iter(self) -> Self::IntoIter {
let (_, values, validity) = self.into_inner();
let values = values.into_iter();
let validity =
validity.and_then(|validity| (validity.unset_bits() > 0).then_some(validity.into_iter()));
let validity = validity
.and_then(|validity| (validity.unset_bits() > 0).then_some(validity.into_iter()));
ZipValidity::new(values, validity)
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/it/io/parquet/read_indexes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ fn read_with_indexes(
first_field_column
.iter()
.zip(selection)
.filter_map(|(i, is_selected)| is_selected.then(|| *i))
.filter_map(|(i, is_selected)| is_selected.then_some(*i))
.collect()
})
})
Expand Down

0 comments on commit 7751abe

Please sign in to comment.