File tree Expand file tree Collapse file tree 2 files changed +75
-76
lines changed Expand file tree Collapse file tree 2 files changed +75
-76
lines changed Original file line number Diff line number Diff line change @@ -95,15 +95,15 @@ fn do_count_chars(s: &Wtf8) -> usize {
95
95
// false), and bytes which are non-continuation bytes are left as `0x01` (e.g.
96
96
// true)
97
97
#[ inline]
98
- const fn contains_non_continuation_byte ( w : usize ) -> usize {
98
+ fn contains_non_continuation_byte ( w : usize ) -> usize {
99
99
const LSB : usize = usize_repeat_u8 ( 0x01 ) ;
100
100
( ( !w >> 7 ) | ( w >> 6 ) ) & LSB
101
101
}
102
102
103
103
// Morally equivalent to `values.to_ne_bytes().into_iter().sum::<usize>()`, but
104
104
// more efficient.
105
105
#[ inline]
106
- const fn sum_bytes_in_usize ( values : usize ) -> usize {
106
+ fn sum_bytes_in_usize ( values : usize ) -> usize {
107
107
const LSB_SHORTS : usize = usize_repeat_u16 ( 0x0001 ) ;
108
108
const SKIP_BYTES : usize = usize_repeat_u16 ( 0x00ff ) ;
109
109
You can’t perform that action at this time.
0 commit comments