Avoid new_without_default_derive in DefaultHashTypes

This commit is contained in:
Dale Wijnand 2018-08-14 09:25:09 +01:00
parent 1812707d39
commit 22ff5a3ef1
No known key found for this signature in database
GPG key ID: 4F256E3D151DF5EF
2 changed files with 2 additions and 2 deletions

View file

@ -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);

View file

@ -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());