Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Augustyniak committed Jun 23, 2022
1 parent 15f722b commit 877e6a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions library/swift/HeadersBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class HeadersBuilder: NSObject {

func headers() -> [String: [String]] {
return Dictionary(uniqueKeysWithValues: self._headers.map { _, value in
return (value.key, value.values)
return (value.key, value.values)
})
}

Expand Down Expand Up @@ -122,7 +122,7 @@ public class HeadersBuilder: NSObject {
for (name, values) in headers {
let lowercasedName = name.lowercased()
/// Dictionaries in Swift are unordered collections. We process headers with keys
/// that are the same when lowercased in an alphabetical order to avoid a situation
/// that are the same when lowercased in an alphabetical order to avoid a situation
/// in which the result of the initialization is underministic i.e., we want
/// "[A: ["1"]", "a: ["2"]]" headers to be always converted to ["A": ["1", "2"]] and
/// never to "a": ["2", "1"].
Expand Down
4 changes: 2 additions & 2 deletions test/swift/HeadersBuilderTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ final class HeadersBuilderTests: XCTestCase {
let headers = HeadersBuilder(headers: [:])
headers.set(name: "foo", value: ["123"])
headers.set(name: "fOo", value: ["abc"])
XCTAssertEqual(["fOo": ["abc"]], headers.headers())
XCTAssertEqual(["fOo": ["abc"]], headers.headers())
}

func testRemovingHeaderIsCaseInsensitive() {
let headers = HeadersBuilder(headers: [:])
headers.set(name: "foo", value: ["123"])
headers.remove(name: "fOo")
XCTAssertEqual([:], headers.headers())
XCTAssertEqual([:], headers.headers())
}

func testRestrictedHeadersAreNotSettable() {
Expand Down

0 comments on commit 877e6a0

Please sign in to comment.