Skip to content

Commit dd2febf

Browse files
committed
Improve decl_check module readability
1 parent 9e172ff commit dd2febf

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

crates/hir_ty/src/diagnostics/decl_check.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ use crate::{
3333
};
3434

3535
mod allow {
36-
pub const NON_SNAKE_CASE: &str = "non_snake_case";
37-
pub const NON_UPPER_CASE_GLOBAL: &str = "non_upper_case_globals";
38-
pub const NON_CAMEL_CASE_TYPES: &str = "non_camel_case_types";
36+
pub(super) const NON_SNAKE_CASE: &str = "non_snake_case";
37+
pub(super) const NON_UPPER_CASE_GLOBAL: &str = "non_upper_case_globals";
38+
pub(super) const NON_CAMEL_CASE_TYPES: &str = "non_camel_case_types";
3939
}
4040

4141
pub(super) struct DeclValidator<'a, 'b: 'a> {
@@ -342,10 +342,10 @@ impl<'a, 'b> DeclValidator<'a, 'b> {
342342
suggested_text: new_name,
343343
expected_case: CaseType::UpperCamelCase,
344344
};
345-
if !non_camel_case_allowed {
346-
Some(replacement)
347-
} else {
345+
if non_camel_case_allowed {
348346
None
347+
} else {
348+
Some(replacement)
349349
}
350350
} else {
351351
None

0 commit comments

Comments
 (0)