Use demand.assertNonZero() in PassthroughSubject (#108)
This commit is contained in:
committed by
Sergej Jaskiewicz
parent
7b3ceae666
commit
130125cb66
@@ -120,7 +120,7 @@ extension PassthroughSubject {
|
||||
}
|
||||
|
||||
fileprivate func request(_ demand: Subscribers.Demand) {
|
||||
precondition(demand > 0, "demand must not be zero")
|
||||
demand.assertNonZero()
|
||||
_parent?._lock.do {
|
||||
_demand += demand
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user