diff --git a/Source/SwiftLintCore/Models/RuleConfigurationDescription.swift b/Source/SwiftLintCore/Models/RuleConfigurationDescription.swift index 82296a8082..20f8802a5c 100644 --- a/Source/SwiftLintCore/Models/RuleConfigurationDescription.swift +++ b/Source/SwiftLintCore/Models/RuleConfigurationDescription.swift @@ -390,7 +390,7 @@ public protocol InlinableOptionType: AcceptableByConfigurationElement {} /// error: 2 /// ``` @propertyWrapper -public struct ConfigurationElement { +public struct ConfigurationElement: Equatable { /// Wrapped option value. public var wrappedValue: T @@ -445,6 +445,10 @@ public struct ConfigurationElement Bool { + lhs.wrappedValue == rhs.wrappedValue && lhs.key == rhs.key + } } extension ConfigurationElement: AnyConfigurationElement { @@ -453,12 +457,6 @@ extension ConfigurationElement: AnyConfigurationElement { } } -extension ConfigurationElement: Equatable { - public static func == (lhs: ConfigurationElement, rhs: ConfigurationElement) -> Bool { - lhs.wrappedValue == rhs.wrappedValue && lhs.key == rhs.key - } -} - // MARK: AcceptableByConfigurationElement conformances extension Optional: AcceptableByConfigurationElement where Wrapped: AcceptableByConfigurationElement {