Skip to content

Commit 8c2558d

Browse files
authored
Merge pull request #966 from ikesyo/address-some-warnings
2 parents e4cfd27 + 2a9bd8f commit 8c2558d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Foundation/NSProcessInfo.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ open class ProcessInfo: NSObject {
9292
return OperatingSystemVersion(majorVersion: fallbackMajor, minorVersion: fallbackMinor, patchVersion: fallbackPatch)
9393
}
9494

95-
let versionComponents = productVersion._swiftObject.characters.split(separator: ".").flatMap(String.init).flatMap({ Int($0) })
95+
let versionComponents = productVersion._swiftObject.characters.split(separator: ".").map(String.init).flatMap({ Int($0) })
9696
let majorVersion = versionComponents.dropFirst(0).first ?? fallbackMajor
9797
let minorVersion = versionComponents.dropFirst(1).first ?? fallbackMinor
9898
let patchVersion = versionComponents.dropFirst(2).first ?? fallbackPatch

TestFoundation/TestNSHTTPCookieStorage.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ class TestNSHTTPCookieStorage: XCTestCase {
239239
//Test by setting the environmental variable
240240
let bundle = Bundle.main
241241
let bundlePath = bundle.bundlePath
242-
var pathIndex = bundlePath.range(of: "/", options: .backwards)?.lowerBound
242+
let pathIndex = bundlePath.range(of: "/", options: .backwards)?.lowerBound
243243
let task = Process()
244244
task.launchPath = bundlePath.substring(to: pathIndex!) + "/xdgTestHelper/xdgTestHelper"
245245
var environment = ProcessInfo.processInfo.environment

0 commit comments

Comments
 (0)