Update pod RxSwift, RxCocoa to 4.5.0

This commit is contained in:
Qiu Yuzhou
2019-09-10 14:30:51 +08:00
parent 075949cdcb
commit 72c643eab2
238 changed files with 9425 additions and 4826 deletions

View File

@ -52,11 +52,7 @@ struct PriorityQueue<Element> {
private mutating func removeAt(_ index: Int) {
let removingLast = index == _elements.count - 1
if !removingLast {
#if swift(>=3.2)
_elements.swapAt(index, _elements.count - 1)
#else
swap(&_elements[index], &_elements[_elements.count - 1])
#endif
}
_ = _elements.popLast()
@ -76,11 +72,7 @@ struct PriorityQueue<Element> {
while unbalancedIndex > 0 {
let parentIndex = (unbalancedIndex - 1) / 2
guard _hasHigherPriority(_elements[unbalancedIndex], _elements[parentIndex]) else { break }
#if swift(>=3.2)
_elements.swapAt(unbalancedIndex, parentIndex)
#else
swap(&_elements[unbalancedIndex], &_elements[parentIndex])
#endif
unbalancedIndex = parentIndex
}
}
@ -105,12 +97,8 @@ struct PriorityQueue<Element> {
}
guard highestPriorityIndex != unbalancedIndex else { break }
#if swift(>=3.2)
_elements.swapAt(highestPriorityIndex, unbalancedIndex)
#else
swap(&_elements[highestPriorityIndex], &_elements[unbalancedIndex])
#endif
unbalancedIndex = highestPriorityIndex
}
}