Minor: remove anonymous class for Map.asSequence

This commit is contained in:
Ilya Gorbunov
2016-08-03 16:50:15 +03:00
parent fb99919c59
commit bb774cea76
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -193,6 +193,6 @@ public inline fun <K, V> Map<out K, V>.asIterable(): Iterable<Map.Entry<K, V>> {
* Creates a [Sequence] instance that wraps the original map returning its entries when being iterated.
*/
public fun <K, V> Map<out K, V>.asSequence(): Sequence<Map.Entry<K, V>> {
return Sequence { this.iterator() }
return entries.asSequence()
}