Commit 50289924 authored by Him188's avatar Him188

Wrap with `withContext`

parent c90013b2
...@@ -148,7 +148,7 @@ suspend inline fun Input.suspendToExternalImage(): ExternalImage = withContext(I ...@@ -148,7 +148,7 @@ suspend inline fun Input.suspendToExternalImage(): ExternalImage = withContext(I
suspend fun ByteReadChannel.toExternalImage(): ExternalImage { suspend fun ByteReadChannel.toExternalImage(): ExternalImage {
val file = createTempFile().apply { deleteOnExit() } val file = createTempFile().apply { deleteOnExit() }
file.outputStream().use { file.outputStream().use {
this.copyTo(it) withContext(IO) { copyTo(it) }
it.flush() it.flush()
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment