From 22ff5a3ef11202b6c21462d8d7dfbeeae31a12ed Mon Sep 17 00:00:00 2001 From: Dale Wijnand Date: Tue, 14 Aug 2018 09:25:09 +0100 Subject: [PATCH] Avoid new_without_default_derive in DefaultHashTypes --- clippy_lints/src/lib.rs | 2 +- clippy_lints/src/utils/internal_lints.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/clippy_lints/src/lib.rs b/clippy_lints/src/lib.rs index 82f974b72..77c1c5c14 100644 --- a/clippy_lints/src/lib.rs +++ b/clippy_lints/src/lib.rs @@ -266,7 +266,7 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>) { reg.register_late_lint_pass(box serde_api::Serde); reg.register_early_lint_pass(box utils::internal_lints::Clippy); reg.register_late_lint_pass(box utils::internal_lints::LintWithoutLintPass::default()); - reg.register_early_lint_pass(box utils::internal_lints::DefaultHashTypes::new()); + reg.register_early_lint_pass(box utils::internal_lints::DefaultHashTypes::default()); reg.register_late_lint_pass(box utils::inspector::Pass); reg.register_late_lint_pass(box utils::author::Pass); reg.register_late_lint_pass(box types::TypePass); diff --git a/clippy_lints/src/utils/internal_lints.rs b/clippy_lints/src/utils/internal_lints.rs index 0da3ad83b..260ced14c 100644 --- a/clippy_lints/src/utils/internal_lints.rs +++ b/clippy_lints/src/utils/internal_lints.rs @@ -228,7 +228,7 @@ pub struct DefaultHashTypes { } impl DefaultHashTypes { - pub fn new() -> Self { + pub fn default() -> Self { let mut map = FxHashMap::default(); map.insert("HashMap".to_owned(), "FxHashMap".to_owned()); map.insert("HashSet".to_owned(), "FxHashSet".to_owned());