Backport to Swift 5.1

This commit is contained in:
Alexandr Goncharov 2020-10-07 19:37:17 +03:00
parent 18740b3981
commit 44c1575cb9
3 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
// swift-tools-version:5.2
// swift-tools-version:5.1
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription

View File

@ -8,7 +8,7 @@ public struct Key {
}
public init(_ elements: [LosslessStringConvertible]) {
path = elements.map(\.description)
path = elements.map { $0.description }
}
public init(_ elements: LosslessStringConvertible...) {

View File

@ -69,7 +69,7 @@ final class ConfigTests: XCTestCase {
}
}
XCTAssertThrowsError(try config.require("missingLossless") as Int?) { error in
XCTAssertThrowsError(try config.require("missingLossless") as Int) { error in
if case let ConfigurationError.missing(key: key) = error {
XCTAssertEqual(key, "missingLossless")
} else {