File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -179,18 +179,18 @@ let request = try HTTPClient.Request(
179179)
180180
181181let delegate = try FileDownloadDelegate (path : " /tmp/latest-build.yml" , reportProgress : {
182- if let totalSize = $0 {
183- print (" Total bytes count: \( totalSize ) " )
182+ if let totalBytes = $0 .totalBytes {
183+ print (" Total bytes count: \( totalBytes ) " )
184184 }
185- print (" Downloaded \( $1 ) bytes so far" )
185+ print (" Downloaded \( $0 . receivedBytes ) bytes so far" )
186186})
187187
188188client.execute (request : request, delegate : delegate).futureResult
189- .whenSuccess { finalTotalBytes, downloadedBytes in
190- if let totalSize = $0 {
191- print (" Final total bytes count: \( totalSize ) " )
189+ .whenSuccess { progress in
190+ if let totalBytes = progress.totalBytes {
191+ print (" Final total bytes count: \( totalBytes ) " )
192192 }
193- print (" Downloaded finished with \( $1 ) bytes downloaded" )
193+ print (" Downloaded finished with \( progress. receivedBytes ) bytes downloaded" )
194194 }
195195```
196196
You can’t perform that action at this time.
0 commit comments