We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
matches!
1 parent f3ab6f0 commit 7a23a71Copy full SHA for 7a23a71
compiler/rustc_ast_pretty/src/pp.rs
@@ -170,17 +170,11 @@ pub enum Token {
170
171
impl Token {
172
crate fn is_eof(&self) -> bool {
173
- match *self {
174
- Token::Eof => true,
175
- _ => false,
176
- }
+ matches!(self, Token::Eof)
177
}
178
179
pub fn is_hardbreak_tok(&self) -> bool {
180
181
- Token::Break(BreakToken { offset: 0, blank_space: bs }) if bs == SIZE_INFINITY => true,
182
183
+ matches!(self, Token::Break(BreakToken { offset: 0, blank_space: SIZE_INFINITY }))
184
185
186
0 commit comments