Skip to content

Commit

Permalink
Remove the assignment of taskDescription
Browse files Browse the repository at this point in the history
  • Loading branch information
ejensen committed May 28, 2024
1 parent 4372b5b commit 0a1611a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Sources/Nuke/Loading/DataLoader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public final class DataLoader: DataLoading, @unchecked Sendable {
if #available(iOS 14.5, tvOS 14.5, watchOS 7.4, macOS 11.3, *) {
task.prefersIncrementalDelivery = prefersIncrementalDelivery
}
return impl.loadData(with: task, request: request, session: session, didReceiveData: didReceiveData, completion: completion)
return impl.loadData(with: task, session: session, didReceiveData: didReceiveData, completion: completion)
}

/// Errors produced by ``DataLoader``.
Expand All @@ -124,15 +124,13 @@ private final class _DataLoader: NSObject, URLSessionDataDelegate {

/// Loads data with the given request.
func loadData(with task: URLSessionDataTask,
request: URLRequest,
session: URLSession,
didReceiveData: @escaping (Data, URLResponse) -> Void,
completion: @escaping (Error?) -> Void) -> any Cancellable {
let handler = _Handler(didReceiveData: didReceiveData, completion: completion)
session.delegateQueue.addOperation { // `URLSession` is configured to use this same queue
self.handlers[task] = handler
}
task.taskDescription = "Nuke Load Data \(request)"
task.resume()
return AnonymousCancellable { task.cancel() }
}
Expand Down

0 comments on commit 0a1611a

Please sign in to comment.