Skip to content

Commit 4aeca59

Browse files
committed
Remove unnecessary parenthesis
1 parent c661e7c commit 4aeca59

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/parser.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ impl<'i: 't, 't> Parser<'i, 't> {
223223
#[inline]
224224
pub fn position(&self) -> SourcePosition {
225225
SourcePosition {
226-
position: (self.tokenizer.0).position(),
226+
position: self.tokenizer.0.position(),
227227
at_start_of: self.at_start_of,
228228
}
229229
}
@@ -234,35 +234,35 @@ impl<'i: 't, 't> Parser<'i, 't> {
234234
/// Should only be used with `SourcePosition` values from the same `Parser` instance.
235235
#[inline]
236236
pub fn reset(&mut self, new_position: SourcePosition) {
237-
(self.tokenizer.0).reset(new_position.position);
237+
self.tokenizer.0.reset(new_position.position);
238238
self.at_start_of = new_position.at_start_of;
239239
}
240240

241241
/// Start looking for `var()` functions. (See the `.seen_var_functions()` method.)
242242
#[inline]
243243
pub fn look_for_var_functions(&mut self) {
244-
(self.tokenizer.0).look_for_var_functions()
244+
self.tokenizer.0.look_for_var_functions()
245245
}
246246

247247
/// Return whether a `var()` function has been seen by the tokenizer since
248248
/// either `look_for_var_functions` was called, and stop looking.
249249
#[inline]
250250
pub fn seen_var_functions(&mut self) -> bool {
251-
(self.tokenizer.0).seen_var_functions()
251+
self.tokenizer.0.seen_var_functions()
252252
}
253253

254254
/// Start looking for viewport percentage lengths. (See the `seen_viewport_percentages`
255255
/// method.)
256256
#[inline]
257257
pub fn look_for_viewport_percentages(&mut self) {
258-
(self.tokenizer.0).look_for_viewport_percentages()
258+
self.tokenizer.0.look_for_viewport_percentages()
259259
}
260260

261261
/// Return whether a `vh`, `vw`, `vmin`, or `vmax` dimension has been seen by the tokenizer
262262
/// since `look_for_viewport_percentages` was called, and stop looking.
263263
#[inline]
264264
pub fn seen_viewport_percentages(&mut self) -> bool {
265-
(self.tokenizer.0).seen_viewport_percentages()
265+
self.tokenizer.0.seen_viewport_percentages()
266266
}
267267

268268
/// Execute the given closure, passing it the parser.
@@ -283,25 +283,25 @@ impl<'i: 't, 't> Parser<'i, 't> {
283283
/// Return a slice of the CSS input
284284
#[inline]
285285
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)
287287
}
288288

289289
/// Return a slice of the CSS input, from the given position to the current one.
290290
#[inline]
291291
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)
293293
}
294294

295295
/// Return the line and column number within the input for the current position.
296296
#[inline]
297297
pub fn current_source_location(&self) -> SourceLocation {
298-
(self.tokenizer.0).current_source_location()
298+
self.tokenizer.0.current_source_location()
299299
}
300300

301301
/// Return the line and column number within the input for the given position.
302302
#[inline]
303303
pub fn source_location(&self, target: SourcePosition) -> SourceLocation {
304-
(self.tokenizer.0).source_location(target.position)
304+
self.tokenizer.0.source_location(target.position)
305305
}
306306

307307
/// 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> {
344344
if let Some(block_type) = self.at_start_of.take() {
345345
consume_until_end_of_block(block_type, &mut self.tokenizer.0);
346346
}
347-
let byte = (self.tokenizer.0).next_byte();
347+
let byte = self.tokenizer.0.next_byte();
348348
if self.stop_before.contains(Delimiters::from_byte(byte)) {
349349
return Err(BasicParseError::EndOfInput)
350350
}
351-
let token = (self.tokenizer.0).next().map_err(|()| BasicParseError::EndOfInput)?;
351+
let token = self.tokenizer.0.next().map_err(|()| BasicParseError::EndOfInput)?;
352352
if let Some(block_type) = BlockType::opening(&token) {
353353
self.at_start_of = Some(block_type);
354354
}

0 commit comments

Comments
 (0)