mirror of
https://github.com/realm/SwiftLint.git
synced 2026-05-07 20:12:49 +00:00
Inline dedicated rule test (#6459)
This commit is contained in:
@@ -140,12 +140,15 @@ extension Example: Hashable {
|
||||
// Ignoring file/line metadata because two Examples could represent
|
||||
// the same idea, but captured at two different points in the code
|
||||
lhs.code == rhs.code
|
||||
&& lhs.configuration?.mapValues(String.init(describing:))
|
||||
== rhs.configuration?.mapValues(String.init(describing:))
|
||||
}
|
||||
|
||||
public func hash(into hasher: inout Hasher) {
|
||||
// Ignoring file/line metadata because two Examples could represent
|
||||
// the same idea, but captured at two different points in the code
|
||||
hasher.combine(code)
|
||||
hasher.combine(configuration?.mapValues(String.init(describing:)))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user