toSingletonMap implementation using MutableMap
This commit is contained in:
committed by
Pavel Punegov
parent
d78d14cd00
commit
6a453c8bb7
@@ -21,4 +21,4 @@ internal inline actual fun <K, V> Map<K, V>.toSingletonMapOrSelf(): Map<K, V> =
|
||||
|
||||
// creates a singleton copy of map
|
||||
internal actual fun <K, V> Map<out K, V>.toSingletonMap(): Map<K, V>
|
||||
= this.toMutableMap() // TODO
|
||||
= with(entries.iterator().next()) { mutableMapOf(key to value) }
|
||||
|
||||
Reference in New Issue
Block a user