소스 검색

cast AnyObject always succeeds. Fix warning.

damuellen 10 년 전
부모
커밋
24956779ed
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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)