Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Swift 3.1 compatibility #55

Merged
merged 2 commits into from
Apr 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cartfile.private
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "AliSoftware/OHHTTPStubs" "swift-3.0"
github "AliSoftware/OHHTTPStubs" "master"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Always scared of pinning to master

Copy link
Contributor Author

@1ec5 1ec5 Apr 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We aren’t pinning to master. See Cartfile.resolved, which specifies the exact commit hash that carthage bootstrap will always fetch, regardless of newer commits on master in the future. This just specifies our intent so that we can easily carthage update to intentionally grab the latest master in the future.

I’m checking this change in now because AliSoftware/OHHTTPStubs#240 has landed and the Swift 3 branch will go away soon. Once that happens, this repository will be stranded; carthage update will error out until this PR is merged.

2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "AliSoftware/OHHTTPStubs" "57feceaabf333e72b2c637dfba6c13a7a5c49619"
github "AliSoftware/OHHTTPStubs" "8660a5a2253bdd6291be36251ba90b06bceb46a2"
2 changes: 1 addition & 1 deletion MapboxStatic/Snapshot.swift
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ open class Snapshot: NSObject {

let apiMessage = json["message"] as? String
guard image != nil && error == nil && apiMessage == nil else {
let apiError = Snapshot.descriptiveError(json, response: response, underlyingError: error as? NSError)
let apiError = Snapshot.descriptiveError(json, response: response, underlyingError: error as NSError?)
DispatchQueue.main.async {
handler(nil, apiError)
}
Expand Down