Skip to content

Commit

Permalink
- Fix crashes in latest XCode
Browse files Browse the repository at this point in the history
  • Loading branch information
NSDavidObject committed Sep 18, 2020
1 parent fff0b9e commit e46cb0e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Benetwork/Additions/URLResponse+Additions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import Foundation
extension URLResponse {

public var statusCode: Int? {
return (self as? HTTPURLResponse)?.statusCode
guard let httpURLResponse = self as? HTTPURLResponse else { return nil }
let statusCode: Int = httpURLResponse.statusCode
return statusCode
}

public var isRateLimitExceeded: Bool {
Expand Down

0 comments on commit e46cb0e

Please sign in to comment.