mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 21:43:37 +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 {
|
mod allow {
|
||||||
pub const NON_SNAKE_CASE: &str = "non_snake_case";
|
pub(super) const NON_SNAKE_CASE: &str = "non_snake_case";
|
||||||
pub const NON_UPPER_CASE_GLOBAL: &str = "non_upper_case_globals";
|
pub(super) 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_CAMEL_CASE_TYPES: &str = "non_camel_case_types";
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(super) struct DeclValidator<'a, 'b: 'a> {
|
pub(super) struct DeclValidator<'a, 'b: 'a> {
|
||||||
|
@ -342,10 +342,10 @@ impl<'a, 'b> DeclValidator<'a, 'b> {
|
||||||
suggested_text: new_name,
|
suggested_text: new_name,
|
||||||
expected_case: CaseType::UpperCamelCase,
|
expected_case: CaseType::UpperCamelCase,
|
||||||
};
|
};
|
||||||
if !non_camel_case_allowed {
|
if non_camel_case_allowed {
|
||||||
Some(replacement)
|
|
||||||
} else {
|
|
||||||
None
|
None
|
||||||
|
} else {
|
||||||
|
Some(replacement)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
|
|
Loading…
Reference in a new issue