Simplify RefTokenTreeCursor::look_ahead.
It's only ever used with a lookahead of 0, so this commit removes the lookahead and renames it `peek`.
This commit is contained in:
parent
6dfa37f02a
commit
5c200c2255
1 changed files with 1 additions and 1 deletions
|
|
@ -86,7 +86,7 @@ fn contains_unhygienic_crate_reference(tts: &TokenStream) -> Option<Span> {
|
|||
while let Some(curr) = cursor.next() {
|
||||
if !prev_is_dollar
|
||||
&& let Some(span) = is_crate_keyword(curr)
|
||||
&& let Some(next) = cursor.look_ahead(0)
|
||||
&& let Some(next) = cursor.peek()
|
||||
&& is_token(next, &TokenKind::PathSep)
|
||||
{
|
||||
return Some(span);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue