Преглед изворни кода

Update acceptableStatusCodes to a Range (#2720)

* Changed array to range

* test

* close #2719
StevenArmandLee пре 6 година
родитељ
комит
5fe7897b8e
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      Source/Validation.swift

+ 1 - 1
Source/Validation.swift

@@ -67,7 +67,7 @@ extension Request {
 
     // MARK: Properties
 
-    fileprivate var acceptableStatusCodes: [Int] { return Array(200..<300) }
+    fileprivate var acceptableStatusCodes: Range<Int> { return 200..<300 }
 
     fileprivate var acceptableContentTypes: [String] {
         if let accept = request?.value(forHTTPHeaderField: "Accept") {