removed nullable array from transport device, as channels close() is more than enough
This commit is contained in:
1 parent
e7abbe6d1d
commit
e619b45485
6 files changed
+30
-17
No files matched your search
@@ -6,7 +6,6 @@ import kotlinx.coroutines.channels.SendChannel
|
||||
import kotlinx.coroutines.test.runTest
|
||||
import net.sergeych.crypto.Key
|
||||
import net.sergeych.crypto.initCrypto
|
||||
import net.sergeych.kiloparsec.command
|
||||
import net.sergeych.kiloparsec.*
|
||||
import net.sergeych.mp_logger.Log
|
||||
import kotlin.test.*
|
||||
@@ -17,7 +16,7 @@ fun createTestDevice(): Pair<Transport.Device, Transport.Device> {
|
||||
val p2 = Channel<UByteArray>(256)
|
||||
val id = ++dcnt
|
||||
val d1 = object : Transport.Device {
|
||||
override val input: ReceiveChannel<UByteArray?> = p1
|
||||
override val input: ReceiveChannel<UByteArray> = p1
|
||||
override val output: SendChannel<UByteArray> = p2
|
||||
override suspend fun close() {
|
||||
p2.close()
|
||||
@@ -28,7 +27,7 @@ fun createTestDevice(): Pair<Transport.Device, Transport.Device> {
|
||||
}
|
||||
}
|
||||
val d2 = object : Transport.Device {
|
||||
override val input: ReceiveChannel<UByteArray?> = p2
|
||||
override val input: ReceiveChannel<UByteArray> = p2
|
||||
override val output: SendChannel<UByteArray> = p1
|
||||
override suspend fun close() {
|
||||
p1.close()
|
||||
|
||||
Reference in new issue
Block a user