@@ -14,23 +14,22 @@ import DiffableTextKit
1414//*============================================================================*
1515
1616@usableFromInline struct Translator {
17- @usableFromInline typealias Map = [ Character : Character ]
1817
1918 //=------------------------------------------------------------------------=
2019 // MARK: State
2120 //=------------------------------------------------------------------------=
2221
23- @usableFromInline private( set) var map = Map ( )
22+ @usableFromInline private( set) var map = [ Character : Character ] ( )
2423
2524 //=------------------------------------------------------------------------=
2625 // MARK: Initializers
2726 //=------------------------------------------------------------------------=
2827
2928 @inlinable init ( _ local: Components ) {
30- self . insert ( from: . ascii, to: local, all : \ . digits , as: { $0 } )
31- self . insert ( from: . ascii, to: local, all : \ . separators , as: { _ in . fraction } )
32- self . insert ( from: local, to: local, all : \ . separators , as: { _ in . fraction } )
33- self . insert ( from: . ascii, to: local, all : \ . signs , as: { $0 } )
29+ self . insert ( \ . digits , from: . ascii, to: local, as: { $0 } )
30+ self . insert ( \ . separators , from: . ascii, to: local, as: { _ in . fraction } )
31+ self . insert ( \ . separators , from: local, to: local, as: { _ in . fraction } )
32+ self . insert ( \ . signs , from: . ascii, to: local, as: { $0 } )
3433 }
3534
3635 //=------------------------------------------------------------------------=
@@ -58,9 +57,8 @@ import DiffableTextKit
5857 // MARK: Helpers
5958 //=------------------------------------------------------------------------=
6059
61- @inlinable mutating func insert< T> (
62- from source: Components , to destination: Components ,
63- all elements: ( Components ) -> Links < T > , as key: ( T ) -> T ) {
60+ @inlinable mutating func insert< T> ( _ elements: ( Components ) -> Links < T > ,
61+ from source: Components , to destination: Components , as key: ( T ) -> T ) {
6462 //=--------------------------------------=
6563 // Values
6664 //=--------------------------------------=
0 commit comments