Skip to content

Commit 1ad82dd

Browse files
committed
swift-2016-05-09
1 parent 7eda3aa commit 1ad82dd

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

Sources/AsyncRoute.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public protocol AsyncRoute: AsyncResponder {
1717
}
1818

1919
extension AsyncRoute {
20-
public func respond(to request: Request, result: (Void throws -> Response) -> Void) {
20+
public func respond(to request: Request, result: ((Void) throws -> Response) -> Void) {
2121
result {
2222
Response(status: .ok)
2323
}

Sources/AsyncRouter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public struct Router: AsyncRouter {
2727
self.respond = respond
2828
}
2929

30-
public func respond(to request: Request, result: (Void throws -> Response) -> Void) {
30+
public func respond(to request: Request, result: ((Void) throws -> Response) -> Void) {
3131
return self.respond(to: request, result: result)
3232
}
3333

Sources/Slimane+Server.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
//
88

99
extension Slimane {
10-
public func listen(loop: Loop = Loop.defaultLoop, host: String = "0.0.0.0", port: Int = 3000, errorHandler: ErrorProtocol -> () = { _ in }) throws {
11-
var server = HTTPServer(loop: loop, ipcEnable: Cluster.isWorker) { [unowned self] in
10+
public func listen(loop: Loop = Loop.defaultLoop, host: String = "0.0.0.0", port: Int = 3000, errorHandler: (ErrorProtocol) -> () = { _ in }) throws {
11+
let server = HTTPServer(loop: loop, ipcEnable: Cluster.isWorker) { [unowned self] in
1212
do {
1313
let (request, stream) = try $0()
1414
self.dispatch(request, stream: stream)

Sources/Slimane.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public class Slimane {
2424

2525
public var backlog: UInt = 1024
2626

27-
public var errorHandler: ErrorProtocol -> Response = defaultErrorHandler
27+
public var errorHandler: (ErrorProtocol) -> Response = defaultErrorHandler
2828

2929
// TODO This is interim measures for handle streaming response
3030
// untill https://github.com/open-swift/S4/pull/52 get merged.

0 commit comments

Comments
 (0)