minor Swift 3 cleanup

This commit is contained in:
John Estropia
2016-12-08 18:59:41 +09:00
parent 5d2956d674
commit a27556f294
21 changed files with 453 additions and 255 deletions

View File

@@ -134,6 +134,16 @@ public struct Into<T: NSManagedObject>: Hashable {
}
// MARK: Equatable
public static func == <T: NSManagedObject, U: NSManagedObject>(lhs: Into<T>, rhs: Into<U>) -> Bool {
return lhs.entityClass == rhs.entityClass
&& lhs.configuration == rhs.configuration
&& lhs.inferStoreIfPossible == rhs.inferStoreIfPossible
}
// MARK: Hashable
public var hashValue: Int {
@@ -172,20 +182,3 @@ public struct Into<T: NSManagedObject>: Hashable {
self.inferStoreIfPossible = inferStoreIfPossible
}
}
// MARK: - Into: Equatable
public func == <T: NSManagedObject, U: NSManagedObject>(lhs: Into<T>, rhs: Into<U>) -> Bool {
return lhs.entityClass == rhs.entityClass
&& lhs.configuration == rhs.configuration
&& lhs.inferStoreIfPossible == rhs.inferStoreIfPossible
}
public func != <T: NSManagedObject, U: NSManagedObject>(lhs: Into<T>, rhs: Into<U>) -> Bool {
return lhs.entityClass == rhs.entityClass
&& lhs.configuration == rhs.configuration
&& lhs.inferStoreIfPossible == rhs.inferStoreIfPossible
}