Inline first_token
.
Because it's tiny and hot.
This commit is contained in:
parent
bd23d68b41
commit
b4fdf648ea
1 changed files with 1 additions and 0 deletions
|
@ -221,6 +221,7 @@ pub fn strip_shebang(input: &str) -> Option<usize> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Parses the first token from the provided input string.
|
/// Parses the first token from the provided input string.
|
||||||
|
#[inline]
|
||||||
pub fn first_token(input: &str) -> Token {
|
pub fn first_token(input: &str) -> Token {
|
||||||
debug_assert!(!input.is_empty());
|
debug_assert!(!input.is_empty());
|
||||||
Cursor::new(input).advance_token()
|
Cursor::new(input).advance_token()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue