Use .apply on the Configuration.enabledFeatures mutable map
This commit is contained in:
parent
1106b8bdae
commit
772e665904
|
@ -70,9 +70,11 @@ object Configuration {
|
|||
writeConfig(it)
|
||||
}
|
||||
}
|
||||
val enabledFeatures: MutableMap<String, Boolean> = if (obtained.hasPath("enabledFeatures")) {
|
||||
obtained.extract("enabledFeatures")
|
||||
} else mutableMapOf()
|
||||
val enabledFeatures = mutableMapOf<String, Boolean>().apply {
|
||||
if (obtained.hasPath("enabledFeatures")) {
|
||||
putAll(obtained.extract("enabledFeatures"))
|
||||
}
|
||||
}
|
||||
val macros: MutableSet<Macro> = run {
|
||||
if (!macroFile.exists()) macroFile.createNewFile()
|
||||
macroFile.readLines(Charset.forName("UTF-8")).map {
|
||||
|
|
Loading…
Reference in New Issue