@@ -19,18 +19,20 @@ import Foundation
1919 // MARK: Instances
2020 //=------------------------------------------------------------------------=
2121
22- @usableFromInline static let zero = Self ( ascii: 48 ) // "0"
23- @usableFromInline static let one = Self ( ascii: 49 ) // "1"
24- @usableFromInline static let two = Self ( ascii: 50 ) // "2"
25- @usableFromInline static let three = Self ( ascii: 51 ) // "3"
26- @usableFromInline static let four = Self ( ascii: 52 ) // "4"
27- @usableFromInline static let five = Self ( ascii: 53 ) // "5"
28- @usableFromInline static let six = Self ( ascii: 54 ) // "6"
29- @usableFromInline static let seven = Self ( ascii: 55 ) // "7"
30- @usableFromInline static let eight = Self ( ascii: 56 ) // "8"
31- @usableFromInline static let nine = Self ( ascii: 57 ) // "9"
32-
33- @usableFromInline static let allCases = ( 48 ..< 58 ) . map ( Self . init)
22+ @usableFromInline static let zero = Self ( ascii: " 0 " )
23+ @usableFromInline static let one = Self ( ascii: " 1 " )
24+ @usableFromInline static let two = Self ( ascii: " 2 " )
25+ @usableFromInline static let three = Self ( ascii: " 3 " )
26+ @usableFromInline static let four = Self ( ascii: " 4 " )
27+ @usableFromInline static let five = Self ( ascii: " 5 " )
28+ @usableFromInline static let six = Self ( ascii: " 6 " )
29+ @usableFromInline static let seven = Self ( ascii: " 7 " )
30+ @usableFromInline static let eight = Self ( ascii: " 8 " )
31+ @usableFromInline static let nine = Self ( ascii: " 9 " )
32+
33+ @usableFromInline static let allCases = [
34+ zero, one, two, three, four,
35+ five, six, seven, eight, nine]
3436
3537 //=------------------------------------------------------------------------=
3638 // MARK: State
@@ -42,7 +44,9 @@ import Foundation
4244 // MARK: Initializers
4345 //=------------------------------------------------------------------------=
4446
45- private init ( ascii: UInt8 ) { self . ascii = ascii }
47+ private init ( ascii: Unicode . Scalar ) {
48+ self . ascii = UInt8 ( ascii: ascii)
49+ }
4650
4751 //=------------------------------------------------------------------------=
4852 // MARK: Utilities
0 commit comments