Use demand.assertNonZero() in PassthroughSubject (#108)

This commit is contained in:
Max Desiatov
2019-11-24 18:44:14 +00:00
committed by Sergej Jaskiewicz
parent 7b3ceae666
commit 130125cb66
+1 -1
View File
@@ -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
}