Inline first_token.
Because it's tiny and hot.
This commit is contained in:
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user