From 821883e06af48d5557a12475d9f08ff1d5c39f1c Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Mon, 22 Apr 2019 21:58:19 +0200 Subject: Code style fixes. --- .../src/main/kotlin/pl/treksoft/kvision/remote/Socket.kt | 3 +-- .../kvision-remote/src/main/kotlin/pl/treksoft/kvision/types/Date.kt | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'kvision-modules/kvision-remote/src') 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. -- cgit