Skip to content

Commit 5adba8e

Browse files
committed
Avoid an unnecessary match when lexing "<-".
1 parent 3af6291 commit 5adba8e

File tree

1 file changed

+1
-5
lines changed
  • src/libsyntax/parse/lexer

1 file changed

+1
-5
lines changed

src/libsyntax/parse/lexer/mod.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -1302,11 +1302,7 @@ impl<'a> StringReader<'a> {
13021302
}
13031303
'-' => {
13041304
self.bump();
1305-
match self.ch.unwrap_or('\x00') {
1306-
_ => {
1307-
Ok(token::LArrow)
1308-
}
1309-
}
1305+
Ok(token::LArrow)
13101306
}
13111307
_ => {
13121308
Ok(token::Lt)

0 commit comments

Comments
 (0)