Skip to content

Commit

Permalink
Remove one of the loadData variant
Browse files Browse the repository at this point in the history
  • Loading branch information
kean committed Aug 18, 2024
1 parent 123586a commit 38dc11c
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions Sources/Nuke/Pipeline/ImagePipeline.swift
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,6 @@ public final class ImagePipeline {

// MARK: - Loading Data (Closures)

/// Loads image data for the given request. The data doesn't get decoded
/// or processed in any other way.
@discardableResult public nonisolated func loadData(with request: ImageRequest, completion: @MainActor @Sendable @escaping (Result<(data: Data, response: URLResponse?), Error>) -> Void) -> ImageTask {
loadData(with: request, progress: nil, completion: completion)
}

/// Loads the image data for the given request. The data doesn't get decoded
/// or processed in any other way.
///
Expand All @@ -226,7 +220,7 @@ public final class ImagePipeline {
/// - completion: A closure to be called on the main thread when the request is finished.
@discardableResult public nonisolated func loadData(
with request: ImageRequest,
progress progressHandler: (@MainActor @Sendable (_ completed: Int64, _ total: Int64) -> Void)?,
progress progressHandler: (@MainActor @Sendable (_ completed: Int64, _ total: Int64) -> Void)? = nil,
completion: @MainActor @Sendable @escaping (Result<(data: Data, response: URLResponse?), Error>) -> Void
) -> ImageTask {
_loadImage(with: request, isDataTask: true) { _, progress in
Expand Down

0 comments on commit 38dc11c

Please sign in to comment.