File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 5
5
#![ crate_name = "cssparser" ]
6
6
#![ crate_type = "rlib" ]
7
7
8
- #![ feature( core, str_char ) ]
8
+ #![ feature( core) ]
9
9
#![ deny( missing_docs) ]
10
10
11
11
/*!
Original file line number Diff line number Diff line change @@ -316,7 +316,7 @@ impl<'a> Tokenizer<'a> {
316
316
317
317
#[ inline]
318
318
fn char_at ( & self , offset : usize ) -> char {
319
- self . input . char_at ( self . position + offset)
319
+ self . input [ self . position + offset.. ] . chars ( ) . next ( ) . unwrap ( )
320
320
}
321
321
322
322
#[ inline]
@@ -327,9 +327,9 @@ impl<'a> Tokenizer<'a> {
327
327
328
328
#[ inline]
329
329
fn consume_char ( & mut self ) -> char {
330
- let range = self . input . char_range_at ( self . position ) ;
331
- self . position = range . next ;
332
- range . ch
330
+ let c = self . next_char ( ) ;
331
+ self . position += c . len_utf8 ( ) ;
332
+ c
333
333
}
334
334
335
335
#[ inline]
You can’t perform that action at this time.
0 commit comments