Skip to content

Commit d875544

Browse files
committed
Remove usage of 5.2-only syntax.
Fixes #97.
1 parent 14c7622 commit d875544

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Sources/ArgumentParser/Parsing/ArgumentSet.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -520,9 +520,11 @@ extension ArgumentSet {
520520
// Finished with the defined arguments; are there leftover values to parse?
521521
skipNonValues()
522522
guard argumentStack.isEmpty else {
523-
let extraValues: [(InputOrigin, String)] = argumentStack.map(\.0).map {
524-
return (InputOrigin(element: $0), unusedInput.originalInput(at: $0)!)
525-
}
523+
let extraValues: [(InputOrigin, String)] = argumentStack
524+
.map { $0.0 }
525+
.map {
526+
(InputOrigin(element: $0), unusedInput.originalInput(at: $0)!)
527+
}
526528
throw ParserError.unexpectedExtraValues(extraValues)
527529
}
528530
}

0 commit comments

Comments
 (0)