]> git.proxmox.com Git - rustc.git/blobdiff - src/tools/rustfmt/src/skip.rs
New upstream version 1.56.0~beta.4+dfsg1
[rustc.git] / src / tools / rustfmt / src / skip.rs
index 6c500635a9551dec165511d10f05a1d4b85b3d53..0fdc097efc23fae6ce60d6faaa5a6461dc2aa1b0 100644 (file)
@@ -32,8 +32,8 @@ impl SkipContext {
     }
 }
 
-static RUSTFMT: &'static str = "rustfmt";
-static SKIP: &'static str = "skip";
+static RUSTFMT: &str = "rustfmt";
+static SKIP: &str = "skip";
 
 /// Say if you're playing with `rustfmt`'s skip attribute
 pub(crate) fn is_skip_attr(segments: &[ast::PathSegment]) -> bool {
@@ -46,7 +46,7 @@ pub(crate) fn is_skip_attr(segments: &[ast::PathSegment]) -> bool {
             segments[1].ident.to_string() == SKIP
                 && ["macros", "attributes"]
                     .iter()
-                    .any(|&n| n == &pprust::path_segment_to_string(&segments[2]))
+                    .any(|&n| n == pprust::path_segment_to_string(&segments[2]))
         }
         _ => false,
     }