mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 02:59:33 +07:00
[fleet] deprecating ServiceEntity<*>
GitOrigin-RevId: d26dd7e0cc2e2c5a4fd35a466e997e5fb9bf7611
This commit is contained in:
committed by
intellij-monorepo-bot
parent
4bed7454d8
commit
ecc3d78a3a
@@ -3,7 +3,6 @@ package fleet.util
|
||||
|
||||
import fleet.util.logging.KLogger
|
||||
import kotlinx.coroutines.CancellationException
|
||||
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.transformWhile
|
||||
|
||||
@@ -31,6 +30,9 @@ fun <T, K> Iterable<T>.associateByUnique(keySelector: (T) -> K): Map<K, T> =
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Same idea as [kotlin.collections.singleOrNull] but will throw if the collection contains more than one element.
|
||||
* */
|
||||
inline fun <T> Iterable<T>.singleOrNullOrThrow(p: (T) -> Boolean = { true }): T? {
|
||||
var single: T? = null
|
||||
var found = false
|
||||
|
||||
Reference in New Issue
Block a user