From 407cf68b43ce27e6701d066c10a93b986edd9d03 Mon Sep 17 00:00:00 2001 From: Bohdan Akimenko Date: Fri, 27 Dec 2024 20:46:30 +0200 Subject: [PATCH] Code cleanup --- .../kotlin/com/sdk/growthbook/model/GBFeature.kt | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/GrowthBook/src/commonMain/kotlin/com/sdk/growthbook/model/GBFeature.kt b/GrowthBook/src/commonMain/kotlin/com/sdk/growthbook/model/GBFeature.kt index bbdc554..5574da5 100644 --- a/GrowthBook/src/commonMain/kotlin/com/sdk/growthbook/model/GBFeature.kt +++ b/GrowthBook/src/commonMain/kotlin/com/sdk/growthbook/model/GBFeature.kt @@ -63,11 +63,11 @@ sealed class GBValue { jsonElement.floatOrNull != null -> GBNumber(jsonElement.float) jsonElement.doubleOrNull != null -> GBNumber(jsonElement.double) jsonElement.booleanOrNull != null -> GBBoolean(jsonElement.boolean) - else -> GBValue.Unknown + else -> Unknown } } is JsonObject -> GBJson(jsonElement) - else -> GBValue.Unknown + else -> Unknown } } } @@ -86,11 +86,7 @@ data class GBFeature( * Array of Rule objects that determine when and how the defaultValue gets overridden */ val rules: List? = null -) { - companion object { - - } -} +) internal fun GBFeature.gbSerialize() = SerializableGBFeature(