diff --git a/common/src/main/kotlin/fr/username404/snowygui/config/Configuration.kt b/common/src/main/kotlin/fr/username404/snowygui/config/Configuration.kt index 34b7b55..87a6a33 100644 --- a/common/src/main/kotlin/fr/username404/snowygui/config/Configuration.kt +++ b/common/src/main/kotlin/fr/username404/snowygui/config/Configuration.kt @@ -118,13 +118,13 @@ object Configuration { ) } private fun Config.withFullModifiableValues() = @Suppress("DEPRECATION_ERROR") - ModifiableValues.entries.fold(this) { previous, entry -> - previous.withValue(entry.key, entry.value.let { - ConfigValueFactory.fromAnyRef( - if (it !is Lazy<*>) it else it.value - ) - }) - } + ModifiableValues.entries.fold(this) { previous, entry -> + previous.withValue(entry.key, entry.value.let { + ConfigValueFactory.fromAnyRef( + if (it !is Lazy<*>) it else it.value + ) + }) + } private suspend fun writeConfig(c: Config) = coroutineScope { launch(start = CoroutineStart.UNDISPATCHED) { file.writeText( @@ -173,5 +173,5 @@ object Configuration { convertValue(T::class) ?: throw e } operator fun setValue(ref: Any?, property: KProperty<*>, value: T) = @Suppress("DEPRECATION_ERROR") - ModifiableValues.setValue(ref, property, value) + ModifiableValues.setValue(ref, property, value) }