Skip to content

Commit 4acd312

Browse files
authored
fix formatting (#12)
motivation: use consistent formatting changes: * run `swiftformat --self insert --patternlet inline --stripunusedargs unnamed-only --comments ignore` which is the standard formatting we use * update generate_linux_tests to follow same formatting rules
1 parent 9b01f9d commit 4acd312

13 files changed

+207
-244
lines changed

Package.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ let package = Package(
2727
targets: [
2828
.target(
2929
name: "NIOHTTPClient",
30-
dependencies: ["NIO", "NIOHTTP1", "NIOSSL", "NIOConcurrencyHelpers"]),
30+
dependencies: ["NIO", "NIOHTTP1", "NIOSSL", "NIOConcurrencyHelpers"]
31+
),
3132
.testTarget(
3233
name: "NIOHTTPClientTests",
33-
dependencies: ["NIOHTTPClient"]),
34+
dependencies: ["NIOHTTPClient"]
35+
),
3436
]
3537
)

Sources/NIOHTTPClient/HTTPCookie.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import Foundation
1616
import NIOHTTP1
1717

1818
public struct HTTPCookie {
19-
2019
public var name: String
2120
public var value: String
2221
public var path: String
@@ -112,13 +111,11 @@ public struct HTTPCookie {
112111
}
113112

114113
public extension HTTPResponse {
115-
116114
internal var cookieHeaders: [HTTPHeaders.Element] {
117115
return headers.filter { $0.name.lowercased() == "set-cookie" }
118116
}
119117

120118
var cookies: [HTTPCookie] {
121-
return cookieHeaders.compactMap { HTTPCookie(from: $0.value, defaultDomain: self.host) }
119+
return self.cookieHeaders.compactMap { HTTPCookie(from: $0.value, defaultDomain: self.host) }
122120
}
123-
124121
}

0 commit comments

Comments
 (0)