소스 검색

[PR #1315] Add `public` ACL to `BackendError` enum in the README.

Add the `public` identifier to the `BackendError` enum in the part about using Generics for Serialization.

Reason:
The extension of Request throws an error ("Method cannot be declared public because its parameter uses an internal type") unless the enum is public.
Adrian Brink 9 년 전
부모
커밋
a53cc42ba7
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      README.md

+ 1 - 1
README.md

@@ -718,7 +718,7 @@ Requests can be suspended, resumed, and cancelled:
 Before implementing custom response serializers or object serialization methods, it's important to be prepared to handle any errors that may occur. Alamofire recommends handling these through the use of either your own `NSError` creation methods, or a simple `enum` that conforms to `ErrorType`. For example, this `BackendError` type, which will be used in later examples:
 
 ```swift
-enum BackendError: ErrorType {
+public enum BackendError: ErrorType {
     case Network(error: NSError)
     case DataSerialization(reason: String)
     case JSONSerialization(error: NSError)