summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/path.rs
diff options
context:
space:
mode:
authorJoshua Nelson <jyn514@gmail.com>2020-10-26 21:02:48 -0400
committerJoshua Nelson <jyn514@gmail.com>2020-10-30 10:13:39 -0400
commit57c6ed0c07aaea9c89a192e54b3274464ebe6fbf (patch)
tree98a2c0310690cf0c09851cb5a12a99264bbbf522 /compiler/rustc_parse/src/parser/path.rs
parentbfecb18771aa0249efe05dd7c35fa232f180bb70 (diff)
downloadrust-57c6ed0c07aaea9c89a192e54b3274464ebe6fbf.tar.gz
rust-57c6ed0c07aaea9c89a192e54b3274464ebe6fbf.zip
Fix even more clippy warnings
Diffstat (limited to 'compiler/rustc_parse/src/parser/path.rs')
-rw-r--r--compiler/rustc_parse/src/parser/path.rs14
1 files changed, 8 insertions, 6 deletions
diff --git a/compiler/rustc_parse/src/parser/path.rs b/compiler/rustc_parse/src/parser/path.rs
index 06760547eba..79e73749038 100644
--- a/compiler/rustc_parse/src/parser/path.rs
+++ b/compiler/rustc_parse/src/parser/path.rs
@@ -187,12 +187,14 @@ impl<'a> Parser<'a> {
     pub(super) fn parse_path_segment(&mut self, style: PathStyle) -> PResult<'a, PathSegment> {
         let ident = self.parse_path_segment_ident()?;
 
-        let is_args_start = |token: &Token| match token.kind {
-            token::Lt
-            | token::BinOp(token::Shl)
-            | token::OpenDelim(token::Paren)
-            | token::LArrow => true,
-            _ => false,
+        let is_args_start = |token: &Token| {
+            matches!(
+                token.kind,
+                token::Lt
+                    | token::BinOp(token::Shl)
+                    | token::OpenDelim(token::Paren)
+                    | token::LArrow
+            )
         };
         let check_args_start = |this: &mut Self| {
             this.expected_tokens.extend_from_slice(&[