-
Notifications
You must be signed in to change notification settings - Fork 109
Swift 4 Updates #196
base: master
Are you sure you want to change the base?
Swift 4 Updates #196
Conversation
…on success syntax
… optional values in Strings.
@@ -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")! } |
There was a problem hiding this comment.
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 ????
There was a problem hiding this comment.
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))") |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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.
This PR updates the framework to Swift 4, and clears all warnings provided from Xcode 9.