From dd2febf05a4ceca23679bb664848cc15fce2f0e9 Mon Sep 17 00:00:00 2001 From: Igor Aleksanov Date: Tue, 3 Nov 2020 10:13:49 +0300 Subject: Improve decl_check module readability --- crates/hir_ty/src/diagnostics/decl_check.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'crates/hir_ty/src/diagnostics/decl_check.rs') diff --git a/crates/hir_ty/src/diagnostics/decl_check.rs b/crates/hir_ty/src/diagnostics/decl_check.rs index 93d61589c..4b3e2fa8f 100644 --- a/crates/hir_ty/src/diagnostics/decl_check.rs +++ b/crates/hir_ty/src/diagnostics/decl_check.rs @@ -33,9 +33,9 @@ use crate::{ }; mod allow { - pub const NON_SNAKE_CASE: &str = "non_snake_case"; - pub const NON_UPPER_CASE_GLOBAL: &str = "non_upper_case_globals"; - pub const NON_CAMEL_CASE_TYPES: &str = "non_camel_case_types"; + pub(super) const NON_SNAKE_CASE: &str = "non_snake_case"; + pub(super) const NON_UPPER_CASE_GLOBAL: &str = "non_upper_case_globals"; + pub(super) const NON_CAMEL_CASE_TYPES: &str = "non_camel_case_types"; } pub(super) struct DeclValidator<'a, 'b: 'a> { @@ -342,10 +342,10 @@ impl<'a, 'b> DeclValidator<'a, 'b> { suggested_text: new_name, expected_case: CaseType::UpperCamelCase, }; - if !non_camel_case_allowed { - Some(replacement) - } else { + if non_camel_case_allowed { None + } else { + Some(replacement) } } else { None -- cgit v1.2.3