diff options
author | Robert Jaros <rjaros@finn.pl> | 2019-04-22 21:58:19 +0200 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2019-04-22 21:58:19 +0200 |
commit | 821883e06af48d5557a12475d9f08ff1d5c39f1c (patch) | |
tree | da3fd2ccc656ecebf7b93b655ad8af956fe814d7 /kvision-modules/kvision-remote/src/main/kotlin | |
parent | 6f7736b85e0889aff26860e2960f52b301f460c5 (diff) | |
download | kvision-821883e06af48d5557a12475d9f08ff1d5c39f1c.tar.gz kvision-821883e06af48d5557a12475d9f08ff1d5c39f1c.tar.bz2 kvision-821883e06af48d5557a12475d9f08ff1d5c39f1c.zip |
Code style fixes.
Diffstat (limited to 'kvision-modules/kvision-remote/src/main/kotlin')
-rw-r--r-- | kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/Socket.kt | 3 | ||||
-rw-r--r-- | kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/types/Date.kt | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/Socket.kt b/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/Socket.kt index 74edaba0..f668d57a 100644 --- a/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/Socket.kt +++ b/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/Socket.kt @@ -92,8 +92,7 @@ class Socket { */ @Suppress("ThrowsCount", "MagicNumber") suspend fun receive(): String { - val event = eventQueue.receive() - return when (event) { + return when (val event = eventQueue.receive()) { is MessageEvent -> { event.data as String } diff --git a/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/types/Date.kt b/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/types/Date.kt index 6dc85060..55025512 100644 --- a/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/types/Date.kt +++ b/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/types/Date.kt @@ -28,7 +28,7 @@ import kotlinx.serialization.SerialDescriptor import kotlinx.serialization.internal.SerialClassDescImpl import kotlin.js.Date -actual typealias Date = kotlin.js.Date +actual typealias Date = Date /** * JSON date serializer. |