[core] Add default AbstractExternalResource.input implementation

This commit is contained in:
Him188 2022-09-09 18:43:29 +08:00
parent 951e835a26
commit 2eb2c3acd0
No known key found for this signature in database
GPG Key ID: BA439CDDCF652375

View File

@ -9,7 +9,9 @@
package net.mamoe.mirai.utils
import io.ktor.utils.io.core.*
import io.ktor.utils.io.errors.*
import io.ktor.utils.io.streams.*
import kotlinx.atomicfu.atomic
import kotlinx.coroutines.CompletableDeferred
import kotlinx.coroutines.Deferred
@ -254,4 +256,9 @@ public constructor(
final override fun close() {
holder.close()
}
@MiraiExperimentalApi
override fun input(): Input {
return inputStream().asInput()
}
}