Rename variable to be more descriptive.
This commit is contained in:
parent
9080448da2
commit
7933bf92a5
1 changed files with 2 additions and 2 deletions
|
@ -116,9 +116,9 @@ fn test_to_upper_snake_case() {
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
pub fn is_valid_name(field_name: &str) -> bool {
|
pub fn is_valid_name(field_name: &str) -> bool {
|
||||||
lazy_static!{
|
lazy_static!{
|
||||||
static ref CAMELCASE: Regex = Regex::new("^[_A-Za-z][_0-9A-Za-z]*$").unwrap();
|
static ref GRAPHQL_NAME_SPEC: Regex = Regex::new("^[_A-Za-z][_0-9A-Za-z]*$").unwrap();
|
||||||
}
|
}
|
||||||
CAMELCASE.is_match(field_name)
|
GRAPHQL_NAME_SPEC.is_match(field_name)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
Loading…
Add table
Reference in a new issue