Fix a deprecation warning in Publishers.Breakpoint implementation

This commit is contained in:
Sergej Jaskiewicz
2020-08-31 15:55:20 +03:00
committed by Sergej Jaskiewicz
parent e962ce1e3b
commit 5da402bb2c
@@ -49,14 +49,14 @@ extension Publisher {
///
/// - Returns: A publisher that raises a debugger signal upon receiving a failure.
public func breakpointOnError() -> Publishers.Breakpoint<Self> {
return breakpoint { completion in
return breakpoint(receiveCompletion: { completion in
switch completion {
case .finished:
return false
case .failure:
return true
}
}
})
}
}