From 82435b9cbbb3783fe76b4ec44fd9813e54934145 Mon Sep 17 00:00:00 2001 From: Tyler Cloutier Date: Sun, 16 Oct 2016 01:32:23 -0700 Subject: [PATCH] Fixed issue with error return type. --- Sources/Signal.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Signal.swift b/Sources/Signal.swift index 11550c6..4abd925 100644 --- a/Sources/Signal.swift +++ b/Sources/Signal.swift @@ -227,7 +227,7 @@ extension SignalType { /// callback. Disposing of the Disposable will have no effect on the Signal /// itself. @discardableResult - public func onFailed(error: @escaping (Error) -> Void) -> Disposable? { + public func onFailed(error: @escaping (ErrorType) -> Void) -> Disposable? { return add(observer: Observer(failed: error)) } @@ -253,7 +253,7 @@ extension SignalType { } /// Maps errors in the signal to a new error. - public func mapError(transform: @escaping (Error) -> F) -> Signal { + public func mapError(transform: @escaping (ErrorType) -> F) -> Signal { return Signal { observer in return self.on { event -> Void in observer.sendEvent(event.mapError(transform))