diff options
author | Igor Aleksanov <[email protected]> | 2020-11-03 07:13:49 +0000 |
---|---|---|
committer | Igor Aleksanov <[email protected]> | 2020-11-03 07:13:49 +0000 |
commit | dd2febf05a4ceca23679bb664848cc15fce2f0e9 (patch) | |
tree | 2aaaf2f4e3fb8b58f61be04ece95e00cc8fda922 /crates/hir_ty/src/diagnostics | |
parent | 9e172ffeb7c01df25097d7888b23a39505cb5aed (diff) |
Improve decl_check module readability
Diffstat (limited to 'crates/hir_ty/src/diagnostics')
-rw-r--r-- | crates/hir_ty/src/diagnostics/decl_check.rs | 12 |
1 files changed, 6 insertions, 6 deletions
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::{ | |||
33 | }; | 33 | }; |
34 | 34 | ||
35 | mod allow { | 35 | mod allow { |
36 | pub const NON_SNAKE_CASE: &str = "non_snake_case"; | 36 | pub(super) const NON_SNAKE_CASE: &str = "non_snake_case"; |
37 | pub const NON_UPPER_CASE_GLOBAL: &str = "non_upper_case_globals"; | 37 | pub(super) const NON_UPPER_CASE_GLOBAL: &str = "non_upper_case_globals"; |
38 | pub const NON_CAMEL_CASE_TYPES: &str = "non_camel_case_types"; | 38 | pub(super) const NON_CAMEL_CASE_TYPES: &str = "non_camel_case_types"; |
39 | } | 39 | } |
40 | 40 | ||
41 | pub(super) struct DeclValidator<'a, 'b: 'a> { | 41 | pub(super) struct DeclValidator<'a, 'b: 'a> { |
@@ -342,10 +342,10 @@ impl<'a, 'b> DeclValidator<'a, 'b> { | |||
342 | suggested_text: new_name, | 342 | suggested_text: new_name, |
343 | expected_case: CaseType::UpperCamelCase, | 343 | expected_case: CaseType::UpperCamelCase, |
344 | }; | 344 | }; |
345 | if !non_camel_case_allowed { | 345 | if non_camel_case_allowed { |
346 | Some(replacement) | ||
347 | } else { | ||
348 | None | 346 | None |
347 | } else { | ||
348 | Some(replacement) | ||
349 | } | 349 | } |
350 | } else { | 350 | } else { |
351 | None | 351 | None |