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.
toByteBufferUnsafe
toArraySlice
1 parent 11ffd3d commit 8773ac1Copy full SHA for 8773ac1
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(bv.toByteBufferUnsafe).toArraySlice
1091
1092
override def toByteBuffer[B >: Byte](implicit ev: B =:= Byte): JByteBuffer =
1093
bv.toByteBuffer
0 commit comments