@@ -40,7 +40,7 @@ public struct BenchmarkRequestContextSource: RequestContextSource {
40
40
41
41
/// Writes ByteBuffers to AsyncChannel outbound writer
42
42
struct BenchmarkBodyWriter : Sendable , ResponseBodyWriter {
43
- func finish( _ trailingHeaders : HTTPFields ? ) async throws { }
43
+ func finish( _: HTTPFields ? ) async throws { }
44
44
func write( _: ByteBuffer ) async throws { }
45
45
}
46
46
@@ -110,7 +110,6 @@ struct EmptyMiddleware<Context>: RouterMiddleware {
110
110
}
111
111
}
112
112
113
-
114
113
extension HTTPField . Name {
115
114
static let test = Self ( " Test " ) !
116
115
}
@@ -168,7 +167,7 @@ func routerBenchmarks() {
168
167
try await write ( buffer)
169
168
try await write ( buffer)
170
169
try await write ( buffer)
171
- } createRouter: {
170
+ } createRouter: {
172
171
let router = Router ( context: BasicBenchmarkContext . self)
173
172
router. post { request, _ in
174
173
Response ( status: . ok, headers: [ : ] , body: . init { writer in
@@ -185,7 +184,7 @@ func routerBenchmarks() {
185
184
" Router:Middleware " ,
186
185
configuration: . init( warmupIterations: 10 ) ,
187
186
request: . init( method: . get, scheme: " http " , authority: " localhost " , path: " / " )
188
- ) {
187
+ ) {
189
188
let router = Router ( context: BasicBenchmarkContext . self)
190
189
router. middlewares. add ( EmptyMiddleware ( ) )
191
190
router. middlewares. add ( EmptyMiddleware ( ) )
@@ -207,7 +206,7 @@ func routerBenchmarks() {
207
206
EmptyMiddleware ( )
208
207
EmptyMiddleware ( )
209
208
EmptyMiddleware ( )
210
- Get { _, _ -> HTTPResponse . Status in
209
+ Get { _, _ -> HTTPResponse . Status in
211
210
. ok
212
211
}
213
212
}
0 commit comments