@@ -19,13 +19,7 @@ pub const UNICODE_VERSION: (u64, u64, u64) = (8, 0, 0);
1919pub mod util {
2020 #[ inline]
2121 pub fn bsearch_range_table ( c : char , r : & ' static [ ( char , char ) ] ) -> bool {
22- #[ cfg( feature = "no_std" ) ]
2322 use core:: cmp:: Ordering :: { Equal , Less , Greater } ;
24- #[ cfg( feature = "no_std" ) ]
25- use core:: slice:: SliceExt ;
26-
27- #[ cfg( not( feature = "no_std" ) ) ]
28- use std:: cmp:: Ordering :: { Equal , Less , Greater } ;
2923 r. binary_search_by ( |& ( lo, hi) | {
3024 if lo <= c && c <= hi { Equal }
3125 else if hi < c { Less }
@@ -285,9 +279,6 @@ mod derived_property {
285279}
286280
287281pub mod grapheme {
288- #[ cfg( feature = "no_std" ) ]
289- use core:: slice:: SliceExt ;
290- #[ cfg( feature = "no_std" ) ]
291282 use core:: result:: Result :: { Ok , Err } ;
292283
293284 pub use self :: GraphemeCat :: * ;
@@ -308,10 +299,7 @@ pub mod grapheme {
308299 }
309300
310301 fn bsearch_range_value_table ( c : char , r : & ' static [ ( char , char , GraphemeCat ) ] ) -> GraphemeCat {
311- #[ cfg( feature = "no_std" ) ]
312302 use core:: cmp:: Ordering :: { Equal , Less , Greater } ;
313- #[ cfg( not( feature = "no_std" ) ) ]
314- use std:: cmp:: Ordering :: { Equal , Less , Greater } ;
315303 match r. binary_search_by ( |& ( lo, hi, _) | {
316304 if lo <= c && c <= hi { Equal }
317305 else if hi < c { Less }
@@ -829,9 +817,6 @@ pub mod grapheme {
829817}
830818
831819pub mod word {
832- #[ cfg( feature = "no_std" ) ]
833- use core:: slice:: SliceExt ;
834- #[ cfg( feature = "no_std" ) ]
835820 use core:: result:: Result :: { Ok , Err } ;
836821
837822 pub use self :: WordCat :: * ;
@@ -859,10 +844,7 @@ pub mod word {
859844 }
860845
861846 fn bsearch_range_value_table ( c : char , r : & ' static [ ( char , char , WordCat ) ] ) -> WordCat {
862- #[ cfg( feature = "no_std" ) ]
863847 use core:: cmp:: Ordering :: { Equal , Less , Greater } ;
864- #[ cfg( not( feature = "no_std" ) ) ]
865- use std:: cmp:: Ordering :: { Equal , Less , Greater } ;
866848 match r. binary_search_by ( |& ( lo, hi, _) | {
867849 if lo <= c && c <= hi { Equal }
868850 else if hi < c { Less }
0 commit comments