mirror of
https://github.com/Suwayomi/TachideskJUI.git
synced 2025-12-10 06:42:05 +01:00
Lint
This commit is contained in:
@@ -22,16 +22,16 @@ actual suspend fun ByteReadChannel.toSource(context: CoroutineContext): Source {
|
||||
channel.cancel()
|
||||
}
|
||||
|
||||
override fun read(sink: Buffer, byteCount: Long): Long {
|
||||
override fun read(
|
||||
sink: Buffer,
|
||||
byteCount: Long,
|
||||
): Long {
|
||||
val buffer = ByteArray(byteCount.toInt())
|
||||
val read = runBlocking(context) { channel.readAvailable(buffer) }
|
||||
sink.write(buffer.reversedArray())
|
||||
return read.toLong()
|
||||
}
|
||||
|
||||
override fun timeout(): Timeout {
|
||||
return Timeout()
|
||||
}
|
||||
override fun timeout(): Timeout = Timeout()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user