2
0
Эх сурвалжийг харах

Fixed build warnings in Xcode 7.3 beta 2 for Swift 2.2

James Barrow 10 жил өмнө
parent
commit
6d1dd287c5

+ 1 - 1
Source/ParameterEncoding.swift

@@ -244,7 +244,7 @@ public enum ParameterEncoding {
             while index != string.endIndex {
                 let startIndex = index
                 let endIndex = index.advancedBy(batchSize, limit: string.endIndex)
-                let range = Range(start: startIndex, end: endIndex)
+                let range = startIndex..<endIndex
 
                 let substring = string.substringWithRange(range)
 

+ 1 - 1
Source/Request.swift

@@ -484,7 +484,7 @@ extension Request: CustomDebugStringConvertible {
             let protectionSpace = NSURLProtectionSpace(
                 host: host,
                 port: URL.port?.integerValue ?? 0,
-                `protocol`: URL.scheme,
+                protocol: URL.scheme,
                 realm: host,
                 authenticationMethod: NSURLAuthenticationMethodHTTPBasic
             )

+ 1 - 1
Tests/ResponseTests.swift

@@ -439,7 +439,7 @@ class RedirectResponseTestCase: BaseTestCase {
         var totalRedirectCount = 0
 
         delegate.taskWillPerformHTTPRedirection = { _, _, _, request in
-            ++totalRedirectCount
+            totalRedirectCount += 1
             return request
         }