We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 11ffd3d + 9154dd8 commit 690b641Copy full SHA for 690b641
core/shared/src/main/scala/fs2/Chunk.scala
@@ -1085,9 +1085,7 @@ object Chunk
1085
def toByteVector() = bv
1086
1087
override def toArraySlice[O2 >: Byte](implicit ct: ClassTag[O2]): Chunk.ArraySlice[O2] =
1088
- if (ct.runtimeClass == classOf[Byte])
1089
- Chunk.ArraySlice[Byte](bv.toArrayUnsafe, 0, size).asInstanceOf[Chunk.ArraySlice[O2]]
1090
- else super.toArraySlice
+ Chunk.ByteBuffer.view(bv.toByteBufferUnsafe).toArraySlice
1091
1092
override def toByteBuffer[B >: Byte](implicit ev: B =:= Byte): JByteBuffer =
1093
bv.toByteBuffer
0 commit comments