Files
SwiftLint/Source/SwiftLintFramework/Models/HashableConfigurationRuleWrapperWrapper.swift
T
2020-11-20 23:08:37 +01:00

16 lines
656 B
Swift

internal struct HashableConfigurationRuleWrapperWrapper: Hashable {
let configurationRuleWrapper: ConfigurationRuleWrapper
static func == (
lhs: HashableConfigurationRuleWrapperWrapper, rhs: HashableConfigurationRuleWrapperWrapper
) -> Bool {
// Only use identifier for equality check (not taking config into account)
return type(of: lhs.configurationRuleWrapper.rule).description.identifier
== type(of: rhs.configurationRuleWrapper.rule).description.identifier
}
func hash(into hasher: inout Hasher) {
hasher.combine(type(of: configurationRuleWrapper.rule).description.identifier)
}
}