Skip to content

Commit

Permalink
Remove unneeded and incorrect comments
Browse files Browse the repository at this point in the history
Wrapping something as a Vert.x `Buffer` by implementing the `Buffer` interface is not viable because `BufferImpl` contains casts from a `Buffer` to a `BufferImpl`.
  • Loading branch information
ShreckYe committed Oct 31, 2024
1 parent 43cc318 commit d012ceb
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ private inline fun Long.toIntOrThrow(): Int {
value class VertxBufferWriteStreamRawSink(val writeStream: WriteStream<VertxBuffer>) : RawSink {
override fun write(source: KotlinxIoBuffer, byteCount: Long) {
runBlocking {
// `source` is temporarily converted to a byte array because wrapping it as a Vert.x `Buffer` is too complicated to implement.
writeStream.write(VertxBuffer.buffer(source.readByteArray(byteCount.toIntOrThrow()))).coAwait()
}
}
Expand All @@ -36,7 +35,6 @@ fun WriteStream<VertxBuffer>.toRawSink(): RawSink =
@JvmInline
value class VertxBufferRawSink(val vertxBuffer: VertxBuffer) : RawSink {
override fun write(source: KotlinxIoBuffer, byteCount: Long) {
// same problem as above
vertxBuffer.appendBytes(source.readByteArray(byteCount.toIntOrThrow()))
}

Expand Down

0 comments on commit d012ceb

Please sign in to comment.