From d012ceb7f73ca2ba252f4a12c9f0bab74187dfb0 Mon Sep 17 00:00:00 2001 From: Shreck Ye Date: Thu, 31 Oct 2024 11:06:18 +0800 Subject: [PATCH] Remove unneeded and incorrect comments 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`. --- .../Kotlin/vertx-web-kotlinx/src/main/kotlin/KotlinxIo.kt | 2 -- 1 file changed, 2 deletions(-) diff --git a/frameworks/Kotlin/vertx-web-kotlinx/src/main/kotlin/KotlinxIo.kt b/frameworks/Kotlin/vertx-web-kotlinx/src/main/kotlin/KotlinxIo.kt index 58a58d6f4e0..6427b91e85e 100644 --- a/frameworks/Kotlin/vertx-web-kotlinx/src/main/kotlin/KotlinxIo.kt +++ b/frameworks/Kotlin/vertx-web-kotlinx/src/main/kotlin/KotlinxIo.kt @@ -16,7 +16,6 @@ private inline fun Long.toIntOrThrow(): Int { value class VertxBufferWriteStreamRawSink(val writeStream: WriteStream) : 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() } } @@ -36,7 +35,6 @@ fun WriteStream.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())) }