From b1f36704c8a6bea5678683fd2258fd75130a937a Mon Sep 17 00:00:00 2001 From: Him188 Date: Sun, 8 Mar 2020 00:24:49 +0800 Subject: [PATCH] Revert "Use `io.ktor.utils.io` than `kotlinx.io`" This reverts commit 6a85769e --- gradle.properties | 1 + .../qqandroid/network/protocol/packet/login/Heartbeat.kt | 2 +- .../kotlin/net.mamoe.mirai/utils/io/ByteArrayPool.kt | 3 ++- .../commonMain/kotlin/net.mamoe.mirai/utils/io/input.kt | 8 ++++---- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/gradle.properties b/gradle.properties index bddc62b33..8f74c62ea 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,6 +10,7 @@ kotlinVersion=1.3.61 serializationVersion=0.14.0 coroutinesVersion=1.3.3 atomicFuVersion=0.14.1 +kotlinXIoVersion=0.1.16 coroutinesIoVersion=0.1.16 # utility ktorVersion=1.3.1 \ No newline at end of file diff --git a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/login/Heartbeat.kt b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/login/Heartbeat.kt index 801a158e7..cfaa0235b 100644 --- a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/login/Heartbeat.kt +++ b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/login/Heartbeat.kt @@ -9,7 +9,7 @@ package net.mamoe.mirai.qqandroid.network.protocol.packet.login -import io.ktor.utils.io.core.ByteReadPacket +import kotlinx.io.core.ByteReadPacket import net.mamoe.mirai.data.Packet import net.mamoe.mirai.qqandroid.QQAndroidBot import net.mamoe.mirai.qqandroid.network.QQAndroidClient diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/ByteArrayPool.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/ByteArrayPool.kt index 294d1a307..12d327afa 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/ByteArrayPool.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/ByteArrayPool.kt @@ -11,7 +11,8 @@ package net.mamoe.mirai.utils.io -import io.ktor.utils.io.pool.DefaultPool +import kotlinx.io.pool.DefaultPool +import kotlinx.io.pool.ObjectPool import net.mamoe.mirai.utils.MiraiInternalAPI /** diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/input.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/input.kt index 235805342..f3f541686 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/input.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/input.kt @@ -13,11 +13,11 @@ package net.mamoe.mirai.utils.io -import io.ktor.utils.io.charsets.Charset -import io.ktor.utils.io.charsets.Charsets -import io.ktor.utils.io.core.* -import io.ktor.utils.io.pool.useInstance import kotlinx.io.OutputStream +import kotlinx.io.charsets.Charset +import kotlinx.io.charsets.Charsets +import kotlinx.io.core.* +import kotlinx.io.pool.useInstance import net.mamoe.mirai.utils.MiraiDebugAPI import net.mamoe.mirai.utils.MiraiInternalAPI import kotlin.contracts.ExperimentalContracts