@@ -51,7 +51,7 @@ import Foundation
51
51
func putDataAsync( _ uploadData: Data ,
52
52
metadata: StorageMetadata ? = nil ,
53
53
onProgress: ( ( Progress ? ) -> Void ) ? = nil ) async throws -> StorageMetadata {
54
- guard let onProgress else {
54
+ guard let onProgress = onProgress else {
55
55
return try await withCheckedThrowingContinuation { continuation in
56
56
self . putData ( uploadData, metadata: metadata) { result in
57
57
continuation. resume ( with: result)
@@ -88,7 +88,7 @@ import Foundation
88
88
func putFileAsync( from url: URL ,
89
89
metadata: StorageMetadata ? = nil ,
90
90
onProgress: ( ( Progress ? ) -> Void ) ? = nil ) async throws -> StorageMetadata {
91
- guard let onProgress else {
91
+ guard let onProgress = onProgress else {
92
92
return try await withCheckedThrowingContinuation { continuation in
93
93
self . putFile ( from: url, metadata: metadata) { result in
94
94
continuation. resume ( with: result)
@@ -122,7 +122,7 @@ import Foundation
122
122
/// - Returns: A `URL` pointing to the file path of the downloaded file.
123
123
func writeAsync( toFile fileURL: URL ,
124
124
onProgress: ( ( Progress ? ) -> Void ) ? = nil ) async throws -> URL {
125
- guard let onProgress else {
125
+ guard let onProgress = onProgress else {
126
126
return try await withCheckedThrowingContinuation { continuation in
127
127
_ = self . write ( toFile: fileURL) { result in
128
128
continuation. resume ( with: result)
0 commit comments