mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
Fixed annoying WeakDictionary warning.. the right way .. I think.
This commit is contained in:
@@ -26,8 +26,12 @@ public struct WeakDictionaryKey<Key: AnyObject & Hashable, Value: AnyObject> : H
|
|||||||
|| lhs.hashValue == rhs.hashValue
|
|| lhs.hashValue == rhs.hashValue
|
||||||
}
|
}
|
||||||
|
|
||||||
public var hashValue: Int {
|
public func hash(into hasher: inout Hasher) {
|
||||||
return baseKey != nil ? hash : nilKeyHash
|
if baseKey == nil {
|
||||||
|
hasher.combine(nilKeyHash)
|
||||||
|
} else {
|
||||||
|
hasher.combine(baseKey)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public var key: Key? {
|
public var key: Key? {
|
||||||
|
|||||||
Reference in New Issue
Block a user