Преглед на файлове

[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)