Skip to content

Commit d733616

Browse files
authored
Merge pull request #3136 from armanbilge/pr/fix-chunk-tobytevector-bytebuffer-linking
Fix `ByteBuffer` linking in `Chunk#toByteVector`
2 parents 8aba938 + d043bc5 commit d733616

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -889,8 +889,8 @@ object Chunk
889889

890890
override def toByteVector[B >: Byte](implicit ev: B =:= Byte): ByteVector = {
891891
val bb = buf.asReadOnlyBuffer()
892-
bb.position(offset)
893-
bb.limit(offset + size)
892+
(bb: JBuffer).position(offset)
893+
(bb: JBuffer).limit(offset + size)
894894
ByteVector.view(bb)
895895
}
896896
}

0 commit comments

Comments
 (0)