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///
@@ -229,7 +229,7 @@ enum PairResult {
229229}
230230
231231fn check_pair ( before : GraphemeCat , after : GraphemeCat ) ->PairResult {
232- use tables:: grapheme:: GraphemeCat :: * ;
232+ use crate :: tables:: grapheme:: GraphemeCat :: * ;
233233use self :: PairResult :: * ;
234234match ( before, after) {
235235( GC_CR , GC_LF ) =>NotBreak , // GB3
@@ -295,8 +295,8 @@ impl GraphemeCursor {
295295}
296296
297297fn grapheme_category ( & mut self , ch : char ) ->GraphemeCat {
298- use tables:: graphemeas gr;
299- use tables:: grapheme:: GraphemeCat :: * ;
298+ use crate :: tables:: graphemeas gr;
299+ use crate :: tables:: grapheme:: GraphemeCat :: * ;
300300
301301if ch <='\u{7e}' {
302302// Special-case optimization for ascii, except U+007F. This
@@ -387,7 +387,7 @@ impl GraphemeCursor {
387387/// assert_eq!(cursor.is_boundary(&flags[8..], 8), Ok(true));
388388/// ```
389389pub fn provide_context ( & mut self , chunk : & str , chunk_start : usize ) {
390- use tables:: graphemeas gr;
390+ use crate :: tables:: graphemeas gr;
391391assert ! ( chunk_start + chunk. len( ) ==self . pre_context_offset. unwrap( ) ) ;
392392self . pre_context_offset =None ;
393393if self . is_extended && chunk_start + chunk. len ( ) ==self . offset {
@@ -433,7 +433,7 @@ impl GraphemeCursor {
433433}
434434
435435fn handle_regional ( & mut self , chunk : & str , chunk_start : usize ) {
436- use tables:: graphemeas gr;
436+ use crate :: tables:: graphemeas gr;
437437let mut ris_count =self . ris_count . unwrap_or ( 0 ) ;
438438for chin chunk. chars ( ) . rev ( ) {
439439if self . grapheme_category ( ch) != gr:: GC_Regional_Indicator {
@@ -453,7 +453,7 @@ impl GraphemeCursor {
453453}
454454
455455fn handle_emoji ( & mut self , chunk : & str , chunk_start : usize ) {
456- use tables:: graphemeas gr;
456+ use crate :: tables:: graphemeas gr;
457457let mut iter = chunk. chars ( ) . rev ( ) ;
458458if let Some ( ch) = iter. next ( ) {
459459if self . grapheme_category ( ch) != gr:: GC_ZWJ {
@@ -506,7 +506,7 @@ impl GraphemeCursor {
506506/// assert_eq!(cursor.is_boundary(flags, 0), Ok(false));
507507/// ```
508508pub fn is_boundary ( & mut self , chunk : & str , chunk_start : usize ) ->Result < bool , GraphemeIncomplete > {
509- use tables:: graphemeas gr;
509+ use crate :: tables:: graphemeas gr;
510510if self . state ==GraphemeState :: Break {
511511return Ok ( true )
512512}