Skip to content

Commit

Permalink
Some cleanup after the first CR round for Alamofire 5
Browse files Browse the repository at this point in the history
  • Loading branch information
sunshinejr committed Jul 28, 2019
1 parent f32dc83 commit 2509742
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Sources/Moya/Moya+Alamofire.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public typealias DownloadDestination = Alamofire.DownloadRequest.Destination
/// Make the Alamofire Request type conform to our type, to prevent leaking Alamofire to plugins.
extension Request: RequestType { }

/// Represents Request interceptor type that can can modify/act on Request
/// Represents Request interceptor type that can modify/act on Request
public typealias RequestInterceptor = Alamofire.RequestInterceptor

/// Internal token that can be used to cancel requests
Expand Down
1 change: 0 additions & 1 deletion Sources/Moya/MoyaProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ open class MoyaProvider<Target: TargetType>: MoyaProviderType {
/// of a request for a given `TargetType`.
public let stubClosure: StubClosure

/// The session for the session.
public let session: Session

/// A list of plugins.
Expand Down
14 changes: 7 additions & 7 deletions Tests/PropertyListEncoding.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ internal struct PropertyListEncoding: ParameterEncoding {

// MARK: Properties
/// Returns a default `PropertyListEncoding` instance.
public static var `default`: PropertyListEncoding { return PropertyListEncoding() }
static var `default`: PropertyListEncoding { return PropertyListEncoding() }

/// Returns a `PropertyListEncoding` instance with xml formatting and default writing options.
public static var xml: PropertyListEncoding { return PropertyListEncoding(format: .xml) }
static var xml: PropertyListEncoding { return PropertyListEncoding(format: .xml) }

/// Returns a `PropertyListEncoding` instance with binary formatting and default writing options.
public static var binary: PropertyListEncoding { return PropertyListEncoding(format: .binary) }
static var binary: PropertyListEncoding { return PropertyListEncoding(format: .binary) }

/// The property list serialization format.
public let format: PropertyListSerialization.PropertyListFormat
let format: PropertyListSerialization.PropertyListFormat

/// The options for writing the parameters as plist data.
public let options: PropertyListSerialization.WriteOptions
let options: PropertyListSerialization.WriteOptions

// MARK: Initialization
/// Creates a `PropertyListEncoding` instance using the specified format and options.
Expand All @@ -25,7 +25,7 @@ internal struct PropertyListEncoding: ParameterEncoding {
/// - parameter options: The options for writing the parameters as plist data.
///
/// - returns: The new `PropertyListEncoding` instance.
public init(
init(
format: PropertyListSerialization.PropertyListFormat = .xml,
options: PropertyListSerialization.WriteOptions = 0) {
self.format = format
Expand All @@ -41,7 +41,7 @@ internal struct PropertyListEncoding: ParameterEncoding {
/// - throws: An `Error` if the encoding process encounters an error.
///
/// - returns: The encoded request.
public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest {
func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest {
var urlRequest = try urlRequest.asURLRequest()

guard let parameters = parameters else { return urlRequest }
Expand Down

0 comments on commit 2509742

Please sign in to comment.