Merge pull request #1154 from SixFiveSoftware/tech/remove_unused_variables

Remove unused index var in when.swift
This commit is contained in:
Max Howell 2020-06-24 10:22:33 -04:00 committed by GitHub
commit f6b15b7626
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -154,14 +154,12 @@ public func when<It: IteratorProtocol>(fulfilled promiseIterator: It, concurrent
}
guard shouldDequeue else { return }
var index: Int!
var promise: It.Element!
barrier.sync(flags: .barrier) {
guard let next = generator.next() else { return }
promise = next
index = promises.count
pendingPromises += 1
promises.append(next)