File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -345,17 +345,14 @@ impl Token {
345345 }
346346
347347 pub fn is_op ( & self ) -> bool {
348- !matches ! (
349- self . kind,
350- OpenDelim ( ..)
351- | CloseDelim ( ..)
352- | Literal ( ..)
353- | DocComment ( ..)
354- | Ident ( ..)
355- | Lifetime ( ..)
356- | Interpolated ( ..)
357- | Eof
358- )
348+ match self . kind {
349+ Eq | Lt | Le | EqEq | Ne | Ge | Gt | AndAnd | OrOr | Not | Tilde | BinOp ( _)
350+ | BinOpEq ( _) | At | Dot | DotDot | DotDotDot | DotDotEq | Comma | Semi | Colon
351+ | ModSep | RArrow | LArrow | FatArrow | Pound | Dollar | Question | SingleQuote => true ,
352+
353+ OpenDelim ( ..) | CloseDelim ( ..) | Literal ( ..) | DocComment ( ..) | Ident ( ..)
354+ | Lifetime ( ..) | Interpolated ( ..) | Eof => false ,
355+ }
359356 }
360357
361358 pub fn is_like_plus ( & self ) -> bool {
You can’t perform that action at this time.
0 commit comments