From b61bdcd67d5e3b0bf6170ccd9164f4a3c5e9766b Mon Sep 17 00:00:00 2001 From: Nikolay Krasko Date: Mon, 11 Feb 2013 16:08:19 +0400 Subject: [PATCH] Remove extension toArray() --- libraries/stdlib/src/kotlin/JUtil.kt | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/libraries/stdlib/src/kotlin/JUtil.kt b/libraries/stdlib/src/kotlin/JUtil.kt index 2c05dce61f6..fc015040ae4 100644 --- a/libraries/stdlib/src/kotlin/JUtil.kt +++ b/libraries/stdlib/src/kotlin/JUtil.kt @@ -16,17 +16,6 @@ val Collection<*>.indices : IntRange val Int.indices: IntRange get() = 0..this-1 -/** - * Converts the collection to an array - */ -public inline fun Collection.toArray() : Array { - val answer = arrayOfNulls(this.size) - var idx = 0 - for (elem in this) - answer[idx++] = elem - return answer as Array -} - /** Returns true if the collection is not empty */ public inline fun Collection.notEmpty() : Boolean = !this.isEmpty()