]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/core.rs
Use .as_deref() instead of .as_ref().map(Deref::deref) (clippy::option_as_ref_deref)
[rust.git] / src / librustdoc / core.rs
index 8c4e65765d32f63df410be5754ff3f40c4eec906..8bc34e949f175649cd0ec54e72eb92aac4d2c31e 100644 (file)
 use rustc_resolve as resolve;
 use rustc_session::lint;
 
+use rustc_ast::ast::CRATE_NODE_ID;
 use rustc_attr as attr;
 use rustc_errors::emitter::{Emitter, EmitterWriter};
 use rustc_errors::json::JsonEmitter;
 use rustc_span::source_map;
 use rustc_span::symbol::sym;
 use rustc_span::DUMMY_SP;
-use syntax::ast::CRATE_NODE_ID;
 
 use rustc_data_structures::sync::{self, Lrc};
 use std::cell::RefCell;
@@ -283,7 +283,7 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt
         .filter_map(|lint| {
             // We don't want to whitelist *all* lints so let's
             // ignore those ones.
-            if whitelisted_lints.iter().any(|l| &lint.name == l) {
+            if whitelisted_lints.iter().any(|l| lint.name == l) {
                 None
             } else {
                 Some((lint::LintId::of(lint), lint::Allow))