Skip to content

Commit c89a02f

Browse files
committed
Remove skip_whitespace after already skipped
1 parent ce81596 commit c89a02f

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/parse.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ fn token_kind(input: Cursor) -> PResult<TokenTree> {
219219
}
220220

221221
fn group(input: Cursor) -> PResult<Group> {
222-
let input = skip_whitespace(input);
223222
if let Ok(input) = input.expect("(") {
224223
let (input, ts) = token_stream(input)?;
225224
let input = skip_whitespace(input);
@@ -307,7 +306,6 @@ fn literal_nocapture(input: Cursor) -> PResult<()> {
307306
}
308307

309308
fn string(input: Cursor) -> PResult<()> {
310-
let input = skip_whitespace(input);
311309
if let Ok(input) = input.expect("\"") {
312310
let (input, ()) = cooked_string(input)?;
313311
let input = input.expect("\"")?;
@@ -367,7 +365,6 @@ fn cooked_string(input: Cursor) -> PResult<()> {
367365
}
368366

369367
fn byte_string(input: Cursor) -> PResult<()> {
370-
let input = skip_whitespace(input);
371368
if let Ok(input) = input.expect("b\"") {
372369
let (input, ()) = cooked_byte_string(input)?;
373370
let input = input.expect("\"")?;
@@ -449,7 +446,6 @@ fn raw_string(input: Cursor) -> PResult<()> {
449446
}
450447

451448
fn byte(input: Cursor) -> PResult<()> {
452-
let input = skip_whitespace(input);
453449
let input = input.expect("b'")?;
454450
let (input, ()) = cooked_byte(input)?;
455451
let input = input.expect("'")?;
@@ -484,7 +480,6 @@ fn cooked_byte(input: Cursor) -> PResult<()> {
484480
}
485481

486482
fn character(input: Cursor) -> PResult<()> {
487-
let input = skip_whitespace(input);
488483
let input = input.expect("'")?;
489484
let (input, ()) = cooked_char(input)?;
490485
let input = input.expect("'")?;
@@ -760,7 +755,6 @@ fn doc_comment(input: Cursor) -> PResult<Vec<TokenTree>> {
760755
}
761756

762757
fn doc_comment_contents(input: Cursor) -> PResult<(&str, bool)> {
763-
let input = skip_whitespace(input);
764758
if input.starts_with("//!") {
765759
let input = input.advance(3);
766760
let (input, s) = take_until_newline_or_eof(input);

0 commit comments

Comments
 (0)