Skip to content

Commit

Permalink
chore: pass clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonLi-cn committed Apr 12, 2024
1 parent 1f33609 commit 0ac14ba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions datafusion/functions/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ where
/// NOTE:
/// 1. When using this function, be sure to ensure that the corresponding `Hint` for
/// `array_iter` must be `Hint::AcceptsSingular`.
/// 2. You cannot call this function on all `args` of `inner` at the same time; there
/// is a risk of never being able to exit the iteration!
/// 2. You cannot call this function on all `args` of `inner` of `make_scalar_function`
/// at the same time; there is a risk of never being able to exit the iteration!
pub(super) fn adaptive_array_iter<'a, T>(
mut array_iter: ArrayIter<T>,
) -> impl Iterator<Item = Option<T::Item>> + 'a
Expand All @@ -135,9 +135,9 @@ where
{
if array_iter.len() == 1 {
let value = array_iter.next().expect("Contains a value");
Either::Left(std::iter::repeat(value).into_iter())
Either::Left(std::iter::repeat(value))
} else {
Either::Right(array_iter.into_iter())
Either::Right(array_iter)
}
}

Expand Down

0 comments on commit 0ac14ba

Please sign in to comment.