mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[air] update applier diff on typing
GitOrigin-RevId: e77495caaf613d9b95a35aeb1c697c77fec63252
This commit is contained in:
committed by
intellij-monorepo-bot
parent
10247e173d
commit
b63f27c3f9
@@ -31,4 +31,17 @@ fun <T> List<T>.indexOfOrNull(element: T): Int? {
|
||||
else {
|
||||
index
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun <A, B> Iterable<A>.zipWithNulls(other: Iterable<B>): Iterable<Pair<A?, B?>> {
|
||||
val iter1 = this.iterator()
|
||||
val iter2 = other.iterator()
|
||||
|
||||
val list = ArrayList<Pair<A?, B?>>()
|
||||
while (iter1.hasNext() || iter2.hasNext()) {
|
||||
val v1 = if (iter1.hasNext()) iter1.next() else null
|
||||
val v2 = if (iter2.hasNext()) iter2.next() else null
|
||||
list.add(Pair(v1, v2))
|
||||
}
|
||||
return list
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user