Skip to content

Swift 4#70

Merged
klefevre merged 5 commits into
masterfrom
swift4
Sep 21, 2017
Merged

Swift 4#70
klefevre merged 5 commits into
masterfrom
swift4

Conversation

@klefevre
Copy link
Copy Markdown
Contributor

@klefevre klefevre commented Sep 20, 2017

@jeremiegirault could you review if I missed something on this one please ?

@jeremiegirault
Copy link
Copy Markdown
Contributor

Sure I'm going to look at it

Comment thread Postal/Postal.swift
private extension Postal {

func doAsync<T, E: Error>(_ f: @escaping () throws -> T, completion: @escaping (Result<T, E>) -> Void) {
func doAsync<T, E>(_ f: @escaping () throws -> T, completion: @escaping (Result<T, E>) -> Void) {
Copy link
Copy Markdown
Contributor

@jeremiegirault jeremiegirault Sep 20, 2017

Choose a reason for hiding this comment

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

was it intended ? If so, I'm interested to know why ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's to fix a warning Redundant conformance constraint 'E': 'Error'.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Because result already constraints E: Error ? Interesting, did not know that feature of swift 4. Thank you !

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Me neither, was surprised actually.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What's surprising is that it did not trigger in some other places, but we did not use a lot of generic constraints in Postal

@jeremiegirault
Copy link
Copy Markdown
Contributor

BTW I guess you can update the README badge for swift version :)

@klefevre
Copy link
Copy Markdown
Contributor Author

Well I think we're good to go.

@klefevre klefevre merged commit b6c047d into master Sep 21, 2017
@klefevre klefevre deleted the swift4 branch September 21, 2017 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants