Skip to content

Commit

Permalink
Remove unused .iterable
Browse files Browse the repository at this point in the history
  • Loading branch information
kyri-petrou committed Aug 13, 2024
1 parent aeb1962 commit 66e040e
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions zio-query/shared/src/main/scala/zio/query/ZQuery.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1865,10 +1865,9 @@ object ZQuery {
@inline private def collectArrayZIO[R, E, A: ClassTag](
in: Array[ZIO[R, E, A]]
)(implicit trace: Trace): ZIO[R, E, Array[A]] = {
val iterator = in.iterator
val out = Array.ofDim[A](in.length)
val size = in.length
var i = 0
val size = in.length
val out = Array.ofDim[A](size)
var i = 0

ZIO.whileLoop(i < size)(in(i)) { v => out(i) = v; i += 1 }.as(out)
}
Expand All @@ -1890,9 +1889,8 @@ object ZQuery {
}
}

var i = 0
val size = results.length
var doneSize, effectSize, getSize = 0
val size = results.length
var i, doneSize, effectSize, getSize = 0

// 2-pass to pre-size arrays. Benchmarks show that this is faster than a single-pass using unsized builders
while (i < size) {
Expand Down

0 comments on commit 66e040e

Please sign in to comment.