Skip to content

Commit 454233d

Browse files
authored
Merge pull request #3634 from dotty-staging/3.8.0
chore: migrate to source compatibility with 3.8.0
2 parents ec246de + ed7108f commit 454233d

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

core/shared/src/main/scala-2.13+/fs2/Chunk213And3Compat.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ private[fs2] trait ChunkCompanion213And3Compat {
8585
i match {
8686
case arraySeq: ArraySeq[O] =>
8787
val arr = arraySeq.unsafeArray.asInstanceOf[Array[O]]
88-
Some(array(arr)(ClassTag[O](arr.getClass.getComponentType)))
88+
Some(array(arr)(using ClassTag[O](arr.getClass.getComponentType)))
8989

9090
case _ =>
9191
None

core/shared/src/main/scala-3/fs2/ChunkPlatform.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ private[fs2] trait ChunkPlatform[+O] extends Chunk213And3Compat[O] {
3535
this match {
3636
case as: Chunk.IArraySlice[_] if ct.wrap.runtimeClass eq as.getClass =>
3737
as.asInstanceOf[Chunk.IArraySlice[O2]]
38-
case _ => new Chunk.IArraySlice(IArray.unsafeFromArray(toArray(ct)), 0, size)
38+
case _ => new Chunk.IArraySlice(IArray.unsafeFromArray(toArray(using ct)), 0, size)
3939
}
4040

4141
private[fs2] def asSeqPlatform: Option[IndexedSeq[O]] =
@@ -54,7 +54,7 @@ private[fs2] trait ChunkPlatform[+O] extends Chunk213And3Compat[O] {
5454
Some(
5555
ArraySeq
5656
.unsafeWrapArray(
57-
IArray.genericWrapArray(iArraySlice.values).toArray(iArraySlice.ct)
57+
IArray.genericWrapArray(iArraySlice.values).toArray(using iArraySlice.ct)
5858
)
5959
.slice(
6060
from = iArraySlice.offset,

core/shared/src/main/scala-3/internal/package.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ package object internal {
2828
private[fs2] type Factory[-A, +C] = scala.collection.Factory[A, C]
2929

3030
private[fs2] def makeArrayBuilder[A](implicit ct: ClassTag[A]): ArrayBuilder[A] =
31-
ArrayBuilder.make(ct)
31+
ArrayBuilder.make(using ct)
3232
}

core/shared/src/main/scala/fs2/Chunk.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ object Chunk
776776

777777
case a: mutable.ArraySeq[o] =>
778778
val arr = a.array.asInstanceOf[Array[O]]
779-
array(arr)(ClassTag(arr.getClass.getComponentType))
779+
array(arr)(using ClassTag(arr.getClass.getComponentType))
780780

781781
case l: List[O] =>
782782
if (l.isEmpty) empty

core/shared/src/main/scala/fs2/Compiler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ object Compiler extends CompilerLowPriority {
179179
}
180180

181181
implicit def forSync[F[_]](implicit F: Sync[F]): Target[F] = F match {
182-
case async: Async[F @unchecked] => Target.forConcurrent(async)
182+
case async: Async[F @unchecked] => Target.forConcurrent(using async)
183183
case _ => new SyncTarget
184184
}
185185

core/shared/src/main/scala/fs2/text.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ object text {
556556
case Some((max, raiseThrowable)) if stringBuilder.length > max =>
557557
Pull.raiseError[F](
558558
new LineTooLongException(stringBuilder.length, max)
559-
)(raiseThrowable)
559+
)(using raiseThrowable)
560560
case _ =>
561561
Pull.output(Chunk.from(linesBuffer)) >> go(
562562
stream,

0 commit comments

Comments
 (0)