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

Commit

Permalink
use FnMut for PrimitiveArray::apply_validity
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Jul 22, 2022
1 parent dc77578 commit 02046eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/array/primitive/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ impl<T: NativeType> PrimitiveArray<T> {
/// This is an API to leverage clone-on-write
/// # Panics
/// This function panics if the function `f` modifies the length of the [`Bitmap`].
pub fn apply_validity<F: Fn(Bitmap) -> Bitmap>(&mut self, f: F) {
pub fn apply_validity<F: FnMut(Bitmap) -> Bitmap>(&mut self, f: F) {
if let Some(validity) = std::mem::take(&mut self.validity) {
self.set_validity(Some(f(validity)))
}
Expand Down

0 comments on commit 02046eb

Please sign in to comment.