mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
Improve decl_check module readability
This commit is contained in:
parent
9e172ffeb7
commit
dd2febf05a
1 changed files with 6 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue