Re-order `CustomRules.swift` (#4944)

For consistency with other files in this project, which usually have
private extensions at the bottom of the file.
This commit is contained in:
JP Simard 2023-04-26 14:37:40 -04:00 committed by GitHub
parent ea56405983
commit 72c2a5488d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 8 deletions

View File

@ -1,16 +1,10 @@
import Foundation
private extension Region {
func isRuleDisabled(customRuleIdentifier: String) -> Bool {
return disabledRuleIdentifiers.contains(RuleIdentifier(customRuleIdentifier))
}
}
// MARK: - CustomRulesConfiguration
struct CustomRulesConfiguration: RuleConfiguration, Equatable, CacheDescriptionProvider {
var consoleDescription: String { return "user-defined" }
internal var cacheDescription: String {
var cacheDescription: String {
return customRuleConfigurations
.sorted { $0.identifier < $1.identifier }
.map { $0.cacheDescription }
@ -41,7 +35,7 @@ struct CustomRulesConfiguration: RuleConfiguration, Equatable, CacheDescriptionP
// MARK: - CustomRules
struct CustomRules: Rule, ConfigurationProviderRule, CacheDescriptionProvider {
internal var cacheDescription: String {
var cacheDescription: String {
return configuration.cacheDescription
}
@ -93,3 +87,9 @@ struct CustomRules: Rule, ConfigurationProviderRule, CacheDescriptionProvider {
}
}
}
private extension Region {
func isRuleDisabled(customRuleIdentifier: String) -> Bool {
return disabledRuleIdentifiers.contains(RuleIdentifier(customRuleIdentifier))
}
}