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.
writableSegment
1 parent c06a601 commit e358b77Copy full SHA for e358b77
core/common/src/Buffer.kt
@@ -352,7 +352,9 @@ public class Buffer : Source, Sink {
352
@PublishedApi
353
@JvmSynthetic
354
internal fun writableSegment(minimumCapacity: Int): Segment {
355
- require(minimumCapacity >= 1 && minimumCapacity <= Segment.SIZE) { "unexpected capacity" }
+ require(minimumCapacity >= 1 && minimumCapacity <= Segment.SIZE) {
356
+ "unexpected capacity ($minimumCapacity), should be in range [1, ${Segment.SIZE}]"
357
+ }
358
359
if (tail == null) {
360
val result = SegmentPool.take() // Acquire a first segment.
0 commit comments