Improve indentation a bit in Configuration.kt
Signed-off-by: Username404-59 <w.iron.zombie@gmail.com>
This commit is contained in:
parent
ed3d5d447a
commit
f3c1b4f0c8
@ -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 <T> setValue(ref: Any?, property: KProperty<*>, value: T) = @Suppress("DEPRECATION_ERROR")
|
||||
ModifiableValues.setValue(ref, property, value)
|
||||
ModifiableValues.setValue(ref, property, value)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user