From 630850c54c58124c6b7c8a2c66e52f773310d0d4 Mon Sep 17 00:00:00 2001 From: Him188 Date: Fri, 13 Dec 2019 08:56:18 +0800 Subject: [PATCH] Remove redundant receiver --- .../jvmTest/kotlin/mirai/test/packetdebugger/PacketDebugger.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mirai-core/src/jvmTest/kotlin/mirai/test/packetdebugger/PacketDebugger.kt b/mirai-core/src/jvmTest/kotlin/mirai/test/packetdebugger/PacketDebugger.kt index 2e26828ed..0d078bde9 100644 --- a/mirai-core/src/jvmTest/kotlin/mirai/test/packetdebugger/PacketDebugger.kt +++ b/mirai-core/src/jvmTest/kotlin/mirai/test/packetdebugger/PacketDebugger.kt @@ -73,7 +73,7 @@ private fun listenDevice(localIp: String, device: PcapNetworkInterface) { runBlocking { withContext(DISPATCHER) { try { - PacketDebugger.dataReceived(it.rawData.drop(42).toByteArray()) + dataReceived(it.rawData.drop(42).toByteArray()) } catch (e: Throwable) { e.printStackTrace() } @@ -117,6 +117,7 @@ internal fun Recorder.writeTo(file: File) { file.writeText(Json.plain.toJson(ArrayListSerializer(Recorder.Record.serializer()), this.list).toString(), Charset.defaultCharset()) } +@Suppress("unused") suspend fun main() { fun startPacketListening() {