1010
1111use core:: cmp;
1212
13- use tables:: grapheme:: GraphemeCat ;
13+ use crate :: tables:: grapheme:: GraphemeCat ;
1414
1515/// External iterator for grapheme clusters and byte offsets.
1616#[ derive( Clone ) ]
@@ -215,7 +215,7 @@ enum PairResult {
215215}
216216
217217fn check_pair ( before : GraphemeCat , after : GraphemeCat ) ->PairResult {
218- use tables:: grapheme:: GraphemeCat :: * ;
218+ use crate :: tables:: grapheme:: GraphemeCat :: * ;
219219use self :: PairResult :: * ;
220220match ( before, after) {
221221( GC_CR , GC_LF ) =>NotBreak , // GB3
@@ -348,7 +348,7 @@ impl GraphemeCursor {
348348/// assert_eq!(cursor.is_boundary(&flags[8..], 8), Ok(true));
349349/// ```
350350pub fn provide_context ( & mut self , chunk : & str , chunk_start : usize ) {
351- use tables:: graphemeas gr;
351+ use crate :: tables:: graphemeas gr;
352352assert ! ( chunk_start + chunk. len( ) ==self . pre_context_offset. unwrap( ) ) ;
353353self . pre_context_offset =None ;
354354if self . is_extended && chunk_start + chunk. len ( ) ==self . offset {
@@ -394,7 +394,7 @@ impl GraphemeCursor {
394394}
395395
396396fn handle_regional ( & mut self , chunk : & str , chunk_start : usize ) {
397- use tables:: graphemeas gr;
397+ use crate :: tables:: graphemeas gr;
398398let mut ris_count =self . ris_count . unwrap_or ( 0 ) ;
399399for chin chunk. chars ( ) . rev ( ) {
400400if gr:: grapheme_category ( ch) != gr:: GC_Regional_Indicator {
@@ -414,7 +414,7 @@ impl GraphemeCursor {
414414}
415415
416416fn handle_emoji ( & mut self , chunk : & str , chunk_start : usize ) {
417- use tables:: graphemeas gr;
417+ use crate :: tables:: graphemeas gr;
418418for chin chunk. chars ( ) . rev ( ) {
419419match gr:: grapheme_category ( ch) {
420420 gr:: GC_Extend =>( ) ,
@@ -460,7 +460,7 @@ impl GraphemeCursor {
460460/// assert_eq!(cursor.is_boundary(flags, 0), Ok(false));
461461/// ```
462462pub fn is_boundary ( & mut self , chunk : & str , chunk_start : usize ) ->Result < bool , GraphemeIncomplete > {
463- use tables:: graphemeas gr;
463+ use crate :: tables:: graphemeas gr;
464464if self . state ==GraphemeState :: Break {
465465return Ok ( true )
466466}
@@ -550,7 +550,7 @@ impl GraphemeCursor {
550550/// assert_eq!(cursor.next_boundary(&s[2..4], 2), Ok(None));
551551/// ```
552552pub fn next_boundary ( & mut self , chunk : & str , chunk_start : usize ) ->Result < Option < usize > , GraphemeIncomplete > {
553- use tables:: graphemeas gr;
553+ use crate :: tables:: graphemeas gr;
554554if self . offset ==self . len {
555555return Ok ( None ) ;
556556}
@@ -626,7 +626,7 @@ impl GraphemeCursor {
626626/// assert_eq!(cursor.prev_boundary(&s[0..2], 0), Ok(None));
627627/// ```
628628pub fn prev_boundary ( & mut self , chunk : & str , chunk_start : usize ) ->Result < Option < usize > , GraphemeIncomplete > {
629- use tables:: graphemeas gr;
629+ use crate :: tables:: graphemeas gr;
630630if self . offset ==0 {
631631return Ok ( None ) ;
632632}