Skip to content

Commit 6ffc5ad

Browse files
committed
Tidy Token::Text creation in Lexer.lex_text method
1 parent 0d154d2 commit 6ffc5ad

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/lex.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,8 @@ impl<'t> Lexer<'t> {
6464
}
6565
};
6666
self.byte += text.len();
67-
Token::Text {
68-
text,
69-
at: (start, self.byte),
70-
}
67+
let at = (start, self.byte);
68+
Token::Text { text, at }
7169
}
7270

7371
fn lex_text_to_end(&mut self) -> Token<'t> {

0 commit comments

Comments
 (0)