Skip to content

Commit

Permalink
Make tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
czechboy0 committed Aug 1, 2023
1 parent 8fac1e6 commit 597733d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ fileprivate extension UniversalServer where APIHandler: APIProtocol {
switch output {
case let .ok(value):
suppressUnusedWarning(value)
var response: Response = .init(statusCode: 200)
var response = Response(statusCode: 200)
suppressMutabilityWarning(&response)
switch value.body {
case let .json(value):
Expand Down Expand Up @@ -350,7 +350,7 @@ fileprivate extension UniversalServer where APIHandler: APIProtocol {
switch output {
case let .accepted(value):
suppressUnusedWarning(value)
var response: Response = .init(statusCode: 202)
var response = Response(statusCode: 202)
suppressMutabilityWarning(&response)
return response
case let .undocumented(statusCode, _): return .init(statusCode: statusCode)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ fileprivate extension UniversalServer where APIHandler: APIProtocol {
switch output {
case let .ok(value):
suppressUnusedWarning(value)
var response: Response = .init(statusCode: 200)
var response = Response(statusCode: 200)
suppressMutabilityWarning(&response)
try converter.setHeaderFieldAsText(
in: &response.headerFields,
Expand All @@ -152,7 +152,7 @@ fileprivate extension UniversalServer where APIHandler: APIProtocol {
return response
case let .`default`(statusCode, value):
suppressUnusedWarning(value)
var response: Response = .init(statusCode: statusCode)
var response = Response(statusCode: statusCode)
suppressMutabilityWarning(&response)
switch value.body {
case let .json(value):
Expand Down Expand Up @@ -219,7 +219,7 @@ fileprivate extension UniversalServer where APIHandler: APIProtocol {
switch output {
case let .created(value):
suppressUnusedWarning(value)
var response: Response = .init(statusCode: 201)
var response = Response(statusCode: 201)
suppressMutabilityWarning(&response)
try converter.setHeaderFieldAsJSON(
in: &response.headerFields,
Expand All @@ -241,7 +241,7 @@ fileprivate extension UniversalServer where APIHandler: APIProtocol {
return response
case let .badRequest(value):
suppressUnusedWarning(value)
var response: Response = .init(statusCode: 400)
var response = Response(statusCode: 400)
suppressMutabilityWarning(&response)
try converter.setHeaderFieldAsText(
in: &response.headerFields,
Expand Down Expand Up @@ -290,7 +290,7 @@ fileprivate extension UniversalServer where APIHandler: APIProtocol {
switch output {
case let .ok(value):
suppressUnusedWarning(value)
var response: Response = .init(statusCode: 200)
var response = Response(statusCode: 200)
suppressMutabilityWarning(&response)
switch value.body {
case let .json(value):
Expand Down Expand Up @@ -388,7 +388,7 @@ fileprivate extension UniversalServer where APIHandler: APIProtocol {
switch output {
case let .accepted(value):
suppressUnusedWarning(value)
var response: Response = .init(statusCode: 202)
var response = Response(statusCode: 202)
suppressMutabilityWarning(&response)
return response
case let .undocumented(statusCode, _): return .init(statusCode: statusCode)
Expand Down Expand Up @@ -422,7 +422,7 @@ fileprivate extension UniversalServer where APIHandler: APIProtocol {
switch output {
case let .noContent(value):
suppressUnusedWarning(value)
var response: Response = .init(statusCode: 204)
var response = Response(statusCode: 204)
suppressMutabilityWarning(&response)
return response
case let .undocumented(statusCode, _): return .init(statusCode: statusCode)
Expand Down Expand Up @@ -479,12 +479,12 @@ fileprivate extension UniversalServer where APIHandler: APIProtocol {
switch output {
case let .noContent(value):
suppressUnusedWarning(value)
var response: Response = .init(statusCode: 204)
var response = Response(statusCode: 204)
suppressMutabilityWarning(&response)
return response
case let .badRequest(value):
suppressUnusedWarning(value)
var response: Response = .init(statusCode: 400)
var response = Response(statusCode: 400)
suppressMutabilityWarning(&response)
switch value.body {
case let .json(value):
Expand Down Expand Up @@ -555,7 +555,7 @@ fileprivate extension UniversalServer where APIHandler: APIProtocol {
switch output {
case let .ok(value):
suppressUnusedWarning(value)
var response: Response = .init(statusCode: 200)
var response = Response(statusCode: 200)
suppressMutabilityWarning(&response)
switch value.body {
case let .binary(value):
Expand All @@ -572,7 +572,7 @@ fileprivate extension UniversalServer where APIHandler: APIProtocol {
return response
case let .preconditionFailed(value):
suppressUnusedWarning(value)
var response: Response = .init(statusCode: 412)
var response = Response(statusCode: 412)
suppressMutabilityWarning(&response)
switch value.body {
case let .json(value):
Expand All @@ -589,7 +589,7 @@ fileprivate extension UniversalServer where APIHandler: APIProtocol {
return response
case let .internalServerError(value):
suppressUnusedWarning(value)
var response: Response = .init(statusCode: 500)
var response = Response(statusCode: 500)
suppressMutabilityWarning(&response)
switch value.body {
case let .text(value):
Expand Down

0 comments on commit 597733d

Please sign in to comment.