@@ -223,7 +223,7 @@ impl<'i: 't, 't> Parser<'i, 't> {
223
223
#[ inline]
224
224
pub fn position ( & self ) -> SourcePosition {
225
225
SourcePosition {
226
- position : ( self . tokenizer . 0 ) . position ( ) ,
226
+ position : self . tokenizer . 0 . position ( ) ,
227
227
at_start_of : self . at_start_of ,
228
228
}
229
229
}
@@ -234,35 +234,35 @@ impl<'i: 't, 't> Parser<'i, 't> {
234
234
/// Should only be used with `SourcePosition` values from the same `Parser` instance.
235
235
#[ inline]
236
236
pub fn reset ( & mut self , new_position : SourcePosition ) {
237
- ( self . tokenizer . 0 ) . reset ( new_position. position ) ;
237
+ self . tokenizer . 0 . reset ( new_position. position ) ;
238
238
self . at_start_of = new_position. at_start_of ;
239
239
}
240
240
241
241
/// Start looking for `var()` functions. (See the `.seen_var_functions()` method.)
242
242
#[ inline]
243
243
pub fn look_for_var_functions ( & mut self ) {
244
- ( self . tokenizer . 0 ) . look_for_var_functions ( )
244
+ self . tokenizer . 0 . look_for_var_functions ( )
245
245
}
246
246
247
247
/// Return whether a `var()` function has been seen by the tokenizer since
248
248
/// either `look_for_var_functions` was called, and stop looking.
249
249
#[ inline]
250
250
pub fn seen_var_functions ( & mut self ) -> bool {
251
- ( self . tokenizer . 0 ) . seen_var_functions ( )
251
+ self . tokenizer . 0 . seen_var_functions ( )
252
252
}
253
253
254
254
/// Start looking for viewport percentage lengths. (See the `seen_viewport_percentages`
255
255
/// method.)
256
256
#[ inline]
257
257
pub fn look_for_viewport_percentages ( & mut self ) {
258
- ( self . tokenizer . 0 ) . look_for_viewport_percentages ( )
258
+ self . tokenizer . 0 . look_for_viewport_percentages ( )
259
259
}
260
260
261
261
/// Return whether a `vh`, `vw`, `vmin`, or `vmax` dimension has been seen by the tokenizer
262
262
/// since `look_for_viewport_percentages` was called, and stop looking.
263
263
#[ inline]
264
264
pub fn seen_viewport_percentages ( & mut self ) -> bool {
265
- ( self . tokenizer . 0 ) . seen_viewport_percentages ( )
265
+ self . tokenizer . 0 . seen_viewport_percentages ( )
266
266
}
267
267
268
268
/// Execute the given closure, passing it the parser.
@@ -283,25 +283,25 @@ impl<'i: 't, 't> Parser<'i, 't> {
283
283
/// Return a slice of the CSS input
284
284
#[ inline]
285
285
pub fn slice ( & self , range : Range < SourcePosition > ) -> & ' i str {
286
- ( self . tokenizer . 0 ) . slice ( range. start . position ..range. end . position )
286
+ self . tokenizer . 0 . slice ( range. start . position ..range. end . position )
287
287
}
288
288
289
289
/// Return a slice of the CSS input, from the given position to the current one.
290
290
#[ inline]
291
291
pub fn slice_from ( & self , start_position : SourcePosition ) -> & ' i str {
292
- ( self . tokenizer . 0 ) . slice_from ( start_position. position )
292
+ self . tokenizer . 0 . slice_from ( start_position. position )
293
293
}
294
294
295
295
/// Return the line and column number within the input for the current position.
296
296
#[ inline]
297
297
pub fn current_source_location ( & self ) -> SourceLocation {
298
- ( self . tokenizer . 0 ) . current_source_location ( )
298
+ self . tokenizer . 0 . current_source_location ( )
299
299
}
300
300
301
301
/// Return the line and column number within the input for the given position.
302
302
#[ inline]
303
303
pub fn source_location ( & self , target : SourcePosition ) -> SourceLocation {
304
- ( self . tokenizer . 0 ) . source_location ( target. position )
304
+ self . tokenizer . 0 . source_location ( target. position )
305
305
}
306
306
307
307
/// Return the next token in the input that is neither whitespace or a comment,
@@ -344,11 +344,11 @@ impl<'i: 't, 't> Parser<'i, 't> {
344
344
if let Some ( block_type) = self . at_start_of . take ( ) {
345
345
consume_until_end_of_block ( block_type, & mut self . tokenizer . 0 ) ;
346
346
}
347
- let byte = ( self . tokenizer . 0 ) . next_byte ( ) ;
347
+ let byte = self . tokenizer . 0 . next_byte ( ) ;
348
348
if self . stop_before . contains ( Delimiters :: from_byte ( byte) ) {
349
349
return Err ( BasicParseError :: EndOfInput )
350
350
}
351
- let token = ( self . tokenizer . 0 ) . next ( ) . map_err ( |( ) | BasicParseError :: EndOfInput ) ?;
351
+ let token = self . tokenizer . 0 . next ( ) . map_err ( |( ) | BasicParseError :: EndOfInput ) ?;
352
352
if let Some ( block_type) = BlockType :: opening ( & token) {
353
353
self . at_start_of = Some ( block_type) ;
354
354
}
0 commit comments