Parcourir la source

Update acceptableStatusCodes to a Range (#2720)

* Changed array to range

* test

* close #2719
StevenArmandLee il y a 6 ans
Parent
commit
5fe7897b8e
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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") {