From 71ec005d4ed9d6d43e46dc3baaf0fd7bb83bb87d Mon Sep 17 00:00:00 2001 From: Alexander Zolotov Date: Tue, 7 Oct 2025 14:53:16 +0200 Subject: [PATCH] [fleet] replace takeTillFirst with takeUntilInclusive GitOrigin-RevId: 21b9bbbdfbfd10d3b2508f286282d77769442a7e --- .../core/srcCommonMain/fleet/util/CollectionsUtil.kt | 10 ---------- 1 file changed, 10 deletions(-) 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) {