mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-21 17:09:42 +01:00
deleted unnecessary Equatable and Hashable custom implementations
This commit is contained in:
@@ -105,16 +105,18 @@ public enum SetupResult<T: StorageInterface>: Hashable {
|
||||
|
||||
|
||||
// MARK: Hashable
|
||||
|
||||
public var hashValue: Int {
|
||||
|
||||
public func hash(into hasher: inout Hasher) {
|
||||
|
||||
switch self {
|
||||
|
||||
case .success(let storage):
|
||||
return true.hashValue ^ ObjectIdentifier(storage).hashValue
|
||||
hasher.combine(true)
|
||||
hasher.combine(ObjectIdentifier(storage))
|
||||
|
||||
case .failure(let error):
|
||||
return false.hashValue ^ error.hashValue
|
||||
hasher.combine(false)
|
||||
hasher.combine(error)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user