Explorar o código

cast AnyObject always succeeds. Fix warning.

damuellen %!s(int64=10) %!d(string=hai) anos
pai
achega
24956779ed
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Sources/HttpResponse.swift

+ 1 - 1
Sources/HttpResponse.swift

@@ -22,7 +22,7 @@ public enum HttpResponseBody {
         do {
             switch self {
             case .Json(let object):
-                guard let obj = object as? AnyObject where NSJSONSerialization.isValidJSONObject(obj) else {
+                guard case let obj = object where NSJSONSerialization.isValidJSONObject(obj) else {
                     throw SerializationError.InvalidObject
                 }
                 let json = try NSJSONSerialization.dataWithJSONObject(obj, options: NSJSONWritingOptions.PrettyPrinted)