diff options
Diffstat (limited to 'plugins/base/src/main/kotlin/utils/CollectionExtensions.kt')
-rw-r--r-- | plugins/base/src/main/kotlin/utils/CollectionExtensions.kt | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/plugins/base/src/main/kotlin/utils/CollectionExtensions.kt b/plugins/base/src/main/kotlin/utils/CollectionExtensions.kt deleted file mode 100644 index 96a0a039..00000000 --- a/plugins/base/src/main/kotlin/utils/CollectionExtensions.kt +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.base.utils - -// TODO [beresnev] remove this copy-paste and use the same method from stdlib instead after updating to 1.5 -internal inline fun <T, R : Any> Iterable<T>.firstNotNullOfOrNull(transform: (T) -> R?): R? { - for (element in this) { - val result = transform(element) - if (result != null) { - return result - } - } - return null -} |