diff --git a/Sources/Extensions/NumberFormattingService/NumberFormattingService+DefaultImplementation.swift b/Sources/Extensions/NumberFormattingService/NumberFormattingService+DefaultImplementation.swift index 8908bf2e..e8302f51 100644 --- a/Sources/Extensions/NumberFormattingService/NumberFormattingService+DefaultImplementation.swift +++ b/Sources/Extensions/NumberFormattingService/NumberFormattingService+DefaultImplementation.swift @@ -26,7 +26,7 @@ public extension NumberFormattingService { /// Computed static property. Use only once for `formatters` field implementation! static var computedFormatters: [NumberFormatType: NumberFormatter] { - return Dictionary(uniqueKeysWithValues: NumberFormatType.allOptions.map { ($0, $0.numberFormatter) }) + return Dictionary(uniqueKeysWithValues: NumberFormatType.allCases.map { ($0, $0.numberFormatter) }) } func numberFormatter(for format: NumberFormatType) -> NumberFormatter { diff --git a/Sources/Protocols/NumberFormattingService/NumberFormat.swift b/Sources/Protocols/NumberFormattingService/NumberFormat.swift index 91ced382..818eb65a 100644 --- a/Sources/Protocols/NumberFormattingService/NumberFormat.swift +++ b/Sources/Protocols/NumberFormattingService/NumberFormat.swift @@ -23,10 +23,7 @@ import Foundation /// Protocol for describing number format. -public protocol NumberFormat: Hashable { - - /// All available options. - static var allOptions: [Self] { get } +public protocol NumberFormat: Hashable, CaseIterable { /// A NumberFormatter instance for this format. var numberFormatter: NumberFormatter { get }