Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 16a67ba

Browse files
committedFeb 17, 2025·
use assert for _head nil check, use self
1 parent 32751ce commit 16a67ba

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed
 

‎Sources/AsyncHTTPClient/FileDownloadDelegate.swift

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,10 @@ public final class FileDownloadDelegate: HTTPClientResponseDelegate {
2727

2828
public var head: HTTPResponseHead {
2929
get {
30-
#if DEBUG
31-
_head!
32-
#else
33-
_head ?? .init(version: .init(major: 0, minor: 0), status: .init(statusCode: 0))
34-
#endif
30+
assert(self._head != nil)
31+
return self._head!
3532
} set {
36-
_head = newValue
33+
self._head = newValue
3734
}
3835
}
3936

0 commit comments

Comments
 (0)
Please sign in to comment.