-
Notifications
You must be signed in to change notification settings - Fork 26
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
Equatable tweaks #108
Equatable tweaks #108
Conversation
ikesyo
commented
Jul 21, 2018
- Utilize conditional conformances
- Utilize synthesizing Equatable conformance
- Utilize conditional conformances - Utilize synthesizing Equatable conformance
@@ -33,18 +33,3 @@ extension TaskError: CustomStringConvertible { | |||
} | |||
} | |||
} | |||
|
|||
extension TaskError: Equatable { |
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.
is this auto synthesized now? from TaskError: Error, Equatable
?
I saw no tests for this. Do you think it's necessary to add one?
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.
is this auto synthesized now? from TaskError: Error, Equatable ?
Yes
I saw no tests for this. Do you think it's necessary to add one?
Nah. This is tested in the compiler.
@@ -88,19 +88,6 @@ extension Task: Hashable { | |||
} | |||
} | |||
|
|||
private func ==<Key, Value: Equatable>(lhs: [Key: Value]?, rhs: [Key: Value]?) -> Bool { |
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.
This was removed because of auto inference of equality?
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.
[Key: Value]?
is Equatable
automatically now because Optional
and Dictionary
both have conditional Equatable
conformances.
@@ -33,18 +33,3 @@ extension TaskError: CustomStringConvertible { | |||
} | |||
} | |||
} | |||
|
|||
extension TaskError: Equatable { |
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.
is this auto synthesized now? from TaskError: Error, Equatable ?
Yes
I saw no tests for this. Do you think it's necessary to add one?
Nah. This is tested in the compiler.
@@ -88,19 +88,6 @@ extension Task: Hashable { | |||
} | |||
} | |||
|
|||
private func ==<Key, Value: Equatable>(lhs: [Key: Value]?, rhs: [Key: Value]?) -> Bool { |
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.
[Key: Value]?
is Equatable
automatically now because Optional
and Dictionary
both have conditional Equatable
conformances.