Skip to content

Commit 5c200c2

Browse files
committed
Simplify RefTokenTreeCursor::look_ahead.
It's only ever used with a lookahead of 0, so this commit removes the lookahead and renames it `peek`.
1 parent 6dfa37f commit 5c200c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/crate_in_macro_def.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ fn contains_unhygienic_crate_reference(tts: &TokenStream) -> Option<Span> {
8686
while let Some(curr) = cursor.next() {
8787
if !prev_is_dollar
8888
&& let Some(span) = is_crate_keyword(curr)
89-
&& let Some(next) = cursor.look_ahead(0)
89+
&& let Some(next) = cursor.peek()
9090
&& is_token(next, &TokenKind::PathSep)
9191
{
9292
return Some(span);

0 commit comments

Comments
 (0)