Repository: Alamofire/Alamofire
File: Source/Request.swift (Swift)

Code before:
    open func downloadProgress(queue: DispatchQueue = .main, closure: @escaping ProgressHandler) -> Self {
        protectedMutableState.write { $0.downloadProgressHandler = (handler: closure, queue: queue) }

        return self
    }

    /// Sets a closure to be called periodically during the lifecycle of the `Request` as data is sent to the server.
    ///
    /// Only the last closure provided is used.
    ///
    /// - Parameters:
    ///   - queue:   The `DispatchQueue` to execute the closure on. Defaults to `.main`.
    ///   - closure: The closure to be executed periodically as data is sent to the server.
    /// - Returns:   The `Request`.
    @discardableResult
    open func uploadProgress(queue: DispatchQueue = .main, closure: @escaping ProgressHandler) -> Self {
        protectedMutableState.write { $0.uploadProgressHandler = (handler: closure, queue: queue) }

        return self
    }

    // MARK: - Redirects

    /// Sets the redirect handler for the `Request` which will be used if a redirect response is encountered.
    ///
    /// - Parameter handler: The redirect handler.
    /// - Returns: The `Request`.
    @discardableResult
    open func redirect(with handler: RedirectHandler) -> Self {
        protectedMutableState.write { $0.redirectHandler = handler }
        return self
    }
}

// MARK: - Protocol Conformances

extension Request: Equatable {
    public static func == (lhs: Request, rhs: Request) -> Bool {
        return lhs.id == rhs.id
    }
}

extension Request: Hashable {
    public var hashValue: Int {
        return id.hashValue
    }
}

extension Request: CustomStringConvertible {
    /// A textual representation of this instance, including the `HTTPMethod` and `URL` if the `URLRequest` has been
    /// created, as well as the response status code, if a response has been received.

Review comment (suggestion):
As with some of my other comments, I've been using the type for most parameter docs, so "The `RedirectHandler`." would be my doc here. 

Also, lining up all of the "The"s to match my previous alignment. Or we can do a documentation pass later.

Code after:
    ///
    /// Only the last closure provided is used.
    ///
    /// - Parameters:
    ///   - queue:   The `DispatchQueue` to execute the closure on. Defaults to `.main`.
    ///   - closure: The closure to be executed periodically as data is sent to the server.
    /// - Returns:   The `Request`.
    @discardableResult
    open func uploadProgress(queue: DispatchQueue = .main, closure: @escaping ProgressHandler) -> Self {
        protectedMutableState.write { $0.uploadProgressHandler = (handler: closure, queue: queue) }

        return self
    }

    // MARK: - Redirects

    /// Sets the redirect handler for the `Request` which will be used if a redirect response is encountered.
    ///
    /// - Parameter handler: The `RedirectHandler`.
    /// - Returns:           The `Request`.
    @discardableResult
    open func redirect(using handler: RedirectHandler) -> Self {
        protectedMutableState.write { mutableState in
            precondition(mutableState.redirectHandler == nil, "Redirect handler has already set")
            mutableState.redirectHandler = handler
        }

        return self
    }
}

// MARK: - Protocol Conformances

extension Request: Equatable {
    public static func == (lhs: Request, rhs: Request) -> Bool {
        return lhs.id == rhs.id
    }
}

extension Request: Hashable {
    public var hashValue: Int {
        return id.hashValue
    }
}

extension Request: CustomStringConvertible {
    /// A textual representation of this instance, including the `HTTPMethod` and `URL` if the `URLRequest` has been
    /// created, as well as the response status code, if a response has been received.
    public var description: String {
        guard let request = performedRequests.last ?? lastRequest,
            let url = request.url,