diff --git a/fleet/util/core/srcCommonMain/fleet/util/CollectionsUtil.kt b/fleet/util/core/srcCommonMain/fleet/util/CollectionsUtil.kt index 684df09d5dbc..04d50349d5c7 100644 --- a/fleet/util/core/srcCommonMain/fleet/util/CollectionsUtil.kt +++ b/fleet/util/core/srcCommonMain/fleet/util/CollectionsUtil.kt @@ -1,9 +1,6 @@ // Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package fleet.util -import kotlinx.coroutines.flow.Flow -import kotlinx.coroutines.flow.transformWhile - /** * Same idea as [kotlin.collections.singleOrNull] but will throw if the collection contains more than one element. * */ @@ -35,13 +32,6 @@ inline fun Iterable.singleOrNullOrThrowWithMessage(errorMessage: () -> St return single } -inline fun Flow.takeTillFirst(crossinline predicate: (T) -> Boolean): Flow { - return this@takeTillFirst.transformWhile { - emit(it) - !predicate(it) - } -} - inline fun Iterable.takeTillFirst(crossinline predicate: (T) -> Boolean): Iterable { val list = ArrayList() for (item in this) {