Skip to content

Commit 725a0ef

Browse files
author
Frank
committed
change config variables to reference, remove wildcard import
1 parent 9eb52d2 commit 725a0ef

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

clippy_lints/src/disallowed_method.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::utils::span_lint;
22

33
use rustc_data_structures::fx::FxHashSet;
4-
use rustc_hir::*;
4+
use rustc_hir::{Expr, ExprKind};
55
use rustc_lint::{LateContext, LateLintPass};
66
use rustc_session::{declare_tool_lint, impl_lint_pass};
77
use rustc_span::Symbol;
@@ -36,7 +36,7 @@ pub struct DisallowedMethod {
3636
}
3737

3838
impl DisallowedMethod {
39-
pub fn new(disallowed: FxHashSet<String>) -> Self {
39+
pub fn new(disallowed: &FxHashSet<String>) -> Self {
4040
Self {
4141
disallowed: disallowed
4242
.iter()

clippy_lints/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1121,7 +1121,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
11211121
store.register_late_pass(|| box manual_strip::ManualStrip);
11221122
store.register_late_pass(|| box utils::internal_lints::MatchTypeOnDiagItem);
11231123
let disallowed_methods = conf.disallowed_methods.iter().cloned().collect::<FxHashSet<_>>();
1124-
store.register_late_pass(move || box disallowed_method::DisallowedMethod::new(disallowed_methods.clone()));
1124+
store.register_late_pass(move || box disallowed_method::DisallowedMethod::new(&disallowed_methods));
11251125

11261126

11271127
store.register_group(true, "clippy::restriction", Some("clippy_restriction"), vec![

0 commit comments

Comments
 (0)