Skip to content

Commit

Permalink
Run swift-format
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzalonunez authored and github-actions[bot] committed Jul 27, 2023
1 parent 28e467b commit f0476e0
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Sources/Example/middlewares.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Middlewares.swift
//
//
//
// Created by Mauricio Cardozo on 27/07/23.
//
Expand Down
14 changes: 6 additions & 8 deletions Sources/Ginny/Application+RequestHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ extension AsyncRequestHandler {
public func register(in app: Application, for path: String) {
app
.grouped(middlewares)
.on(method, path.pathComponents)
{ [handle] req async throws in
return try await handle(req)
}
.on(method, path.pathComponents) { [handle] req async throws in
return try await handle(req)
}
}
}

Expand All @@ -41,9 +40,8 @@ extension RequestHandler {
public func register(in app: Application, for path: String) {
app
.grouped(middlewares)
.on(method, path.pathComponents)
{ [handle] req throws in
try handle(req)
}
.on(method, path.pathComponents) { [handle] req throws in
try handle(req)
}
}
}
4 changes: 2 additions & 2 deletions Sources/Ginny/AsyncRequestHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ public protocol AsyncRequestHandler {
var middlewares: [Middleware] { get }
}

public extension AsyncRequestHandler {
var middlewares: [Middleware] { [] }
extension AsyncRequestHandler {
public var middlewares: [Middleware] { [] }
}
4 changes: 2 additions & 2 deletions Sources/Ginny/RequestHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ public protocol RequestHandler {
var middlewares: [Middleware] { get }
}

public extension RequestHandler {
var middlewares: [Middleware] { [] }
extension RequestHandler {
public var middlewares: [Middleware] { [] }
}
2 changes: 1 addition & 1 deletion Tests/GinnyTests/RequestHandlerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
//

import Vapor
import XCTest
import XCTVapor
import XCTest

@testable import Ginny

Expand Down

0 comments on commit f0476e0

Please sign in to comment.