Use synthesized implementation
This commit is contained in:
parent
a3fdd633a6
commit
f1a1812ff2
|
@ -8,11 +8,6 @@ struct BagKey: Equatable {
|
||||||
fileprivate init(underlying: UInt64) {
|
fileprivate init(underlying: UInt64) {
|
||||||
self.i = underlying
|
self.i = underlying
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns a Boolean value indicating whether two BagKeys are equal.
|
|
||||||
static func == (lhs: BagKey, rhs: BagKey) -> Bool {
|
|
||||||
return lhs.i == rhs.i
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A generator that can generate a sequence of unique `BagKey`.
|
/// A generator that can generate a sequence of unique `BagKey`.
|
||||||
|
|
|
@ -12,13 +12,7 @@ public struct Interval {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extension Interval: Hashable {
|
extension Interval: Hashable { }
|
||||||
|
|
||||||
/// Returns a boolean value indicating whether two intervals are equal.
|
|
||||||
public static func == (lhs: Interval, rhs: Interval) -> Bool {
|
|
||||||
return lhs.nanoseconds == rhs.nanoseconds
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
extension Interval {
|
extension Interval {
|
||||||
|
|
||||||
|
|
|
@ -8,15 +8,12 @@ extension TaskCenter {
|
||||||
|
|
||||||
weak var task: Task?
|
weak var task: Task?
|
||||||
|
|
||||||
let hash: Int
|
|
||||||
|
|
||||||
init(_ task: Task) {
|
init(_ task: Task) {
|
||||||
self.task = task
|
self.task = task
|
||||||
self.hash = task.hashValue
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func hash(into hasher: inout Hasher) {
|
func hash(into hasher: inout Hasher) {
|
||||||
hasher.combine(hash)
|
hasher.combine(task)
|
||||||
}
|
}
|
||||||
|
|
||||||
static func == (lhs: TaskBox, rhs: TaskBox) -> Bool {
|
static func == (lhs: TaskBox, rhs: TaskBox) -> Bool {
|
||||||
|
|
Loading…
Reference in New Issue