Skip to content

Commit b240a07

Browse files
committed
Reformat
1 parent 4b0b0b8 commit b240a07

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

Sources/OpenAPIRuntime/Conversion/Converter+Server.swift

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,9 @@ extension Converter {
7878
break
7979
case .anySubtype(type: let substringType):
8080
// Only match if the types match.
81-
if substringType.lowercased() == acceptType.lowercased() {
82-
return
83-
}
81+
if substringType.lowercased() == acceptType.lowercased() { return }
8482
case .concrete(type: let substringType, _):
85-
if substringType.lowercased() == acceptType.lowercased() {
86-
return
87-
}
83+
if substringType.lowercased() == acceptType.lowercased() { return }
8884
}
8985
case (.concrete(type: let acceptType, subtype: let acceptSubtype), let substring):
9086
if case let .concrete(substringType, substringSubtype) = substring {

Tests/OpenAPIRuntimeTests/Conversion/Test_Converter+Server.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ final class Test_ServerConverterExtensions: Test_Runtime {
5151
(partialWildcard, "text/plain", true), (partialWildcard, "application/json", false),
5252

5353
// Accept: text/plain, text/plain succeeds, application/json fails
54-
(short, "text/plain", true), (short, "application/json", false),
55-
(short, "application/*", false), (short, "*/*", false),
54+
(short, "text/plain", true), (short, "application/json", false), (short, "application/*", false),
55+
(short, "*/*", false),
5656

5757
// A bunch of acceptable content types
5858
(long, "text/html", true), (long, "application/xhtml+xml", true), (long, "application/xml", true),

0 commit comments

Comments
 (0)