Skip to content

Commit

Permalink
Simplify conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
sumeet-db committed Apr 16, 2024
1 parent e0ba7ff commit bf000cd
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,7 @@ object DeltaHistoryManager extends DeltaLogging {
private def queueItemsIfNeeded(): Unit = {
if (bufferedOutput.isEmpty && bufferedUnderlying.hasNext) {
val group = new mutable.ArrayBuffer[T]()
while (bufferedUnderlying.hasNext &&
(!isNewGroupStart(bufferedUnderlying.head) || group.isEmpty)) {
while (!bufferedUnderlying.headOption.forall(isNewGroupStart) || group.isEmpty) {
group += transformItem(bufferedUnderlying.next())
}
bufferedOutput = Some(group)
Expand Down

0 comments on commit bf000cd

Please sign in to comment.