@@ -123,8 +123,8 @@ const L_LAST: u32 = L_BASE + L_COUNT - 1;
123123const V_LAST : u32 = V_BASE + V_COUNT - 1 ;
124124const T_LAST : u32 = T_BASE + T_COUNT - 1 ;
125125
126- // Composition only occurs for `TPart`s in `U+11A8 ... U+11C2`,
127- // i.e. `T_BASE + 1 ... T_LAST`.
126+ // Composition only occurs for `TPart`s in `U+11A8 ..= U+11C2`,
127+ // i.e. `T_BASE + 1 ..= T_LAST`.
128128const T_FIRST : u32 = T_BASE + 1 ;
129129
130130pub ( crate ) fn is_hangul_syllable ( c : char ) -> bool {
@@ -172,15 +172,15 @@ fn compose_hangul(a: char, b: char) -> Option<char> {
172172 let ( a, b) = ( a as u32 , b as u32 ) ;
173173 match ( a, b) {
174174 // Compose a leading consonant and a vowel together into an LV_Syllable
175- ( L_BASE ... L_LAST , V_BASE ... V_LAST ) => {
175+ ( L_BASE ..= L_LAST , V_BASE ..= V_LAST ) => {
176176 let l_index = a - L_BASE ;
177177 let v_index = b - V_BASE ;
178178 let lv_index = l_index * N_COUNT + v_index * T_COUNT ;
179179 let s = S_BASE + lv_index;
180180 Some ( unsafe { char:: from_u32_unchecked ( s) } )
181181 }
182182 // Compose an LV_Syllable and a trailing consonant into an LVT_Syllable
183- ( S_BASE ... S_LAST , T_FIRST ... T_LAST ) if ( a - S_BASE ) % T_COUNT == 0 => {
183+ ( S_BASE ..= S_LAST , T_FIRST ..= T_LAST ) if ( a - S_BASE ) % T_COUNT == 0 => {
184184 Some ( unsafe { char:: from_u32_unchecked ( a + ( b - T_BASE ) ) } )
185185 }
186186 _ => None ,
@@ -193,7 +193,7 @@ mod tests {
193193
194194 // Regression test from a bugfix where we were composing an LV_Syllable with
195195 // T_BASE directly. (We should only compose an LV_Syllable with a character
196- // in the range `T_BASE + 1 ... T_LAST`.)
196+ // in the range `T_BASE + 1 ..= T_LAST`.)
197197 #[ test]
198198 fn test_hangul_composition ( ) {
199199 assert_eq ! ( compose_hangul( '\u{c8e0}' , '\u{11a7}' ) , None ) ;
0 commit comments