We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad92fee commit 5f5e3dcCopy full SHA for 5f5e3dc
Sources/SwiftDriver/Driver/Driver.swift
@@ -3387,12 +3387,10 @@ extension Driver {
3387
3388
// At most one *use* option allowed
3389
if providedUse.count > 1 {
3390
- for i in 0..<(providedUse.count - 1) {
3391
- for j in (i + 1)..<providedUse.count {
3392
- diagnosticEngine.emit(
3393
- .error(Error.conflictingOptions(providedUse[i], providedUse[j])),
3394
- location: nil
3395
- )
+ for (i, left) in providedUse.enumerated() {
+ for (j, right) in providedUse.enumerated() {
+ guard i < j else { continue }
+ diagnosticEngine.emit(.error(Error.conflictingOptions(left, right)), location: nil)
3396
}
3397
3398
0 commit comments