From c2fda87e1bd53772df9cf0021078b3769e033727 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Mon, 22 Jun 2026 12:00:01 -0700 Subject: [PATCH] Use Swift Data instead of NSMutableData. --- Modules/RSWeb/Sources/RSWeb/DownloadSession.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Modules/RSWeb/Sources/RSWeb/DownloadSession.swift b/Modules/RSWeb/Sources/RSWeb/DownloadSession.swift index 5959e13c3..912ce0782 100755 --- a/Modules/RSWeb/Sources/RSWeb/DownloadSession.swift +++ b/Modules/RSWeb/Sources/RSWeb/DownloadSession.swift @@ -139,7 +139,7 @@ extension DownloadSession: @preconcurrency URLSessionTaskDelegate { return } - delegate.downloadSession(self, downloadDidComplete: info.url, response: info.urlResponse, data: info.data as Data, error: error as NSError?) + delegate.downloadSession(self, downloadDidComplete: info.url, response: info.urlResponse, data: info.data, error: error as NSError?) } } @@ -217,7 +217,7 @@ extension DownloadSession: @preconcurrency URLSessionDataDelegate { } info.addData(data) - if !delegate.downloadSession(self, shouldContinueAfterReceivingData: info.data as Data, url: info.url) { + if !delegate.downloadSession(self, shouldContinueAfterReceivingData: info.data, url: info.url) { dataTask.cancel() removeTask(dataTask) } @@ -519,7 +519,7 @@ extension URLSessionTask { private final class DownloadInfo { let url: URL - let data = NSMutableData() + var data = Data() var urlResponse: URLResponse? init(_ url: URL) {