Skip to content
This repository has been archived by the owner on Jan 25, 2019. It is now read-only.

Swift 4 Updates #196

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Swift 4 Updates #196

wants to merge 11 commits into from

Conversation

kelvinlauKL
Copy link

This PR updates the framework to Swift 4, and clears all warnings provided from Xcode 9.

@@ -134,7 +134,8 @@ struct ValueFormatterRegistry {
/// it will return an absolute URL, relative to the baseURL.
private struct URLValueFormatter: ValueFormatter {
func unformatValue(_ value: String, forAttribute attribute: URLAttribute) -> URL {
return URL(string: value, relativeTo: attribute.baseURL as URL?)!
guard let url = URL(string: value, relativeTo: attribute.baseURL as URL?) else { return URL(string: "www.pixhug.com")! }

Choose a reason for hiding this comment

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

why is www.pixhug.com ????

Copy link
Author

Choose a reason for hiding this comment

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

My bad, this leaked inside by accident

@@ -53,7 +53,7 @@ class FindAllTests: SpineTests {
}

waitForExpectations(timeout: 10) { error in
XCTAssertNil(error, "\(error)")
XCTAssertNil(error, "\(String(describing: error))")

Choose a reason for hiding this comment

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

maybe you can remove "\()", just use String(describing: error)

Copy link
Author

Choose a reason for hiding this comment

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

Yeah, pretty sure that'll work as well. There are quite a few of these String(describing:) changes that I just changed via the auto migrator.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants