]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/rustfmt/src/lib.rs
Merge commit '4236289b75ee55c78538c749512cdbeea5e1c332' into update-rustfmt
[rust.git] / src / tools / rustfmt / src / lib.rs
index ce8a45eea65312dd5fee34d9918b852e9ce10114..206d2f782909c9f0639398ce75044b7509ffdc49 100644 (file)
@@ -2,6 +2,7 @@
 #![deny(rust_2018_idioms)]
 #![warn(unreachable_pub)]
 #![recursion_limit = "256"]
+#![allow(clippy::match_like_matches_macro)]
 
 #[macro_use]
 extern crate derive_new;
@@ -30,7 +31,6 @@
 use std::path::PathBuf;
 use std::rc::Rc;
 
-use ignore;
 use rustc_ast::ast;
 use rustc_span::{symbol, DUMMY_SP};
 use thiserror::Error;
@@ -149,10 +149,7 @@ pub enum ErrorKind {
 
 impl ErrorKind {
     fn is_comment(&self) -> bool {
-        match self {
-            ErrorKind::LostComment => true,
-            _ => false,
-        }
+        matches!(self, ErrorKind::LostComment)
     }
 }