Backport to Swift 5.1
This commit is contained in:
parent
18740b3981
commit
44c1575cb9
|
@ -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
|
||||
|
|
|
@ -8,7 +8,7 @@ public struct Key {
|
|||
}
|
||||
|
||||
public init(_ elements: [LosslessStringConvertible]) {
|
||||
path = elements.map(\.description)
|
||||
path = elements.map { $0.description }
|
||||
}
|
||||
|
||||
public init(_ elements: LosslessStringConvertible...) {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue