Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ private[fs2] trait ChunkCompanion213And3Compat {
i match {
case arraySeq: ArraySeq[O] =>
val arr = arraySeq.unsafeArray.asInstanceOf[Array[O]]
Some(array(arr)(ClassTag[O](arr.getClass.getComponentType)))
Some(array(arr)(using ClassTag[O](arr.getClass.getComponentType)))

case _ =>
None
Expand Down
4 changes: 2 additions & 2 deletions core/shared/src/main/scala-3/fs2/ChunkPlatform.scala
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ private[fs2] trait ChunkPlatform[+O] extends Chunk213And3Compat[O] {
this match {
case as: Chunk.IArraySlice[_] if ct.wrap.runtimeClass eq as.getClass =>
as.asInstanceOf[Chunk.IArraySlice[O2]]
case _ => new Chunk.IArraySlice(IArray.unsafeFromArray(toArray(ct)), 0, size)
case _ => new Chunk.IArraySlice(IArray.unsafeFromArray(toArray(using ct)), 0, size)
}

private[fs2] def asSeqPlatform: Option[IndexedSeq[O]] =
Expand All @@ -55,7 +55,7 @@ private[fs2] trait ChunkPlatform[+O] extends Chunk213And3Compat[O] {
Some(
ArraySeq
.unsafeWrapArray(
IArray.genericWrapArray(iArraySlice.values).toArray(iArraySlice.ct)
IArray.genericWrapArray(iArraySlice.values).toArray(using iArraySlice.ct)
)
.slice(
from = iArraySlice.offset,
Expand Down
2 changes: 1 addition & 1 deletion core/shared/src/main/scala-3/internal/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ package object internal {
private[fs2] type Factory[-A, +C] = scala.collection.Factory[A, C]

private[fs2] def makeArrayBuilder[A](implicit ct: ClassTag[A]): ArrayBuilder[A] =
ArrayBuilder.make(ct)
ArrayBuilder.make(using ct)
}
2 changes: 1 addition & 1 deletion core/shared/src/main/scala/fs2/Chunk.scala
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ object Chunk

case a: mutable.ArraySeq[o] =>
val arr = a.array.asInstanceOf[Array[O]]
array(arr)(ClassTag(arr.getClass.getComponentType))
array(arr)(using ClassTag(arr.getClass.getComponentType))

case l: List[O] =>
if (l.isEmpty) empty
Expand Down
2 changes: 1 addition & 1 deletion core/shared/src/main/scala/fs2/Compiler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ object Compiler extends CompilerLowPriority {
}

implicit def forSync[F[_]](implicit F: Sync[F]): Target[F] = F match {
case async: Async[F @unchecked] => Target.forConcurrent(async)
case async: Async[F @unchecked] => Target.forConcurrent(using async)
case _ => new SyncTarget
}

Expand Down
2 changes: 1 addition & 1 deletion core/shared/src/main/scala/fs2/text.scala
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ object text {
case Some((max, raiseThrowable)) if stringBuilder.length > max =>
Pull.raiseError[F](
new LineTooLongException(stringBuilder.length, max)
)(raiseThrowable)
)(using raiseThrowable)
case _ =>
Pull.output(Chunk.from(linesBuffer)) >> go(
stream,
Expand Down
Loading