Skip to content

Commit 9154dd8

Browse files
committed
Use view to avoid duplicate
1 parent 8773ac1 commit 9154dd8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1085,7 +1085,7 @@ object Chunk
10851085
def toByteVector() = bv
10861086

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

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

0 commit comments

Comments
 (0)