diff --git a/src/swift/Queue.swift b/src/swift/Queue.swift index 1710846f0..2a8c70189 100644 --- a/src/swift/Queue.swift +++ b/src/swift/Queue.swift @@ -246,10 +246,10 @@ public extension DispatchQueue { private func _syncHelper( fn: (@noescape () -> ()) -> (), execute work: @noescape () throws -> T, - rescue: ((ErrorProtocol) throws -> (T))) rethrows -> T + rescue: ((Swift.Error) throws -> (T))) rethrows -> T { var result: T? - var error: ErrorProtocol? + var error: Swift.Error? fn { do { result = try work() @@ -269,10 +269,10 @@ public extension DispatchQueue { fn: (DispatchWorkItem) -> (), flags: DispatchWorkItemFlags, execute work: @noescape () throws -> T, - rescue: ((ErrorProtocol) throws -> (T))) rethrows -> T + rescue: ((Swift.Error) throws -> (T))) rethrows -> T { var result: T? - var error: ErrorProtocol? + var error: Swift.Error? let workItem = DispatchWorkItem(flags: flags, noescapeBlock: { do { result = try work()