Skip to content

Commit

Permalink
Use view to avoid duplicate
Browse files Browse the repository at this point in the history
  • Loading branch information
armanbilge committed Nov 7, 2023
1 parent 8773ac1 commit 9154dd8
Showing 1 changed file with 1 addition and 1 deletion.
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 @@ -1085,7 +1085,7 @@ object Chunk
def toByteVector() = bv

override def toArraySlice[O2 >: Byte](implicit ct: ClassTag[O2]): Chunk.ArraySlice[O2] =
Chunk.ByteBuffer(bv.toByteBufferUnsafe).toArraySlice
Chunk.ByteBuffer.view(bv.toByteBufferUnsafe).toArraySlice

override def toByteBuffer[B >: Byte](implicit ev: B =:= Byte): JByteBuffer =
bv.toByteBuffer
Expand Down

0 comments on commit 9154dd8

Please sign in to comment.