Skip to content

Commit 690e8ee

Browse files
Trevörartemredkin
Trevör
authored andcommitted
Add @discardableResult to HTTPHandler setChannel method (#81)
The only place where this method is currently called uses its return value, but that's specific to the context where it's used (inside of chained calls to map/flatMap). Future uses might not always need to use the return value since it is the same as what's passed as the method argument.
1 parent 45bbe12 commit 690e8ee

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Sources/AsyncHTTPClient/HTTPHandler.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,7 @@ extension HTTPClient {
403403
}
404404
}
405405

406+
@discardableResult
406407
func setChannel(_ channel: Channel) -> Channel {
407408
precondition(self.eventLoop === channel.eventLoop, "Channel must use same event loop as this task.")
408409
return self.lock.withLock {

0 commit comments

Comments
 (0)