Skip to content

Commit 75703bc

Browse files
authored
Merge pull request #1371 from jarinosuke/optional-binding
2 parents 7bf5fc7 + 820e3a8 commit 75703bc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Foundation/URLSession/http/HTTPURLProtocol.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,7 @@ fileprivate extension _HTTPURLProtocol {
212212
func curlHeaders(for httpHeaders: [AnyHashable : Any]?) -> [String] {
213213
var result: [String] = []
214214
var names = Set<String>()
215-
if httpHeaders != nil {
216-
let hh = httpHeaders as! [String:String]
215+
if let hh = httpHeaders as? [String : String] {
217216
hh.forEach {
218217
let name = $0.0.lowercased()
219218
guard !names.contains(name) else { return }

0 commit comments

Comments
 (0)