fix clippy lint `Manual RangeInclusive::contains implementation`
#[macro_export]
macro_rules! octal_digit_char {
($c: expr) => {
- $c >= '0' && $c <= '7'
+ ('0'..='7').contains(&$c)
};
}
#[macro_export]
macro_rules! hexadecimal_digit_char {
($c: expr) => {
- $c >= '0' && $c <= '9' || $c >= 'A' && $c <= 'F' || $c >= 'a' && $c <= 'f'
+ ('0'..='9').contains(&$c) || ('A'..='F').contains(&$c) || ('a'..='f').contains(&$c)
};
}
#[macro_export]
macro_rules! capital_letter_char {
($c: expr) => {
- $c >= 'A' && $c <= 'Z'
+ ('A'..='Z').contains(&$c)
};
}
#[macro_export]
macro_rules! small_letter_char {
($c: expr) => {
- $c >= 'a' && $c <= 'z'
+ ('a'..='z').contains(&$c)
};
}
#[macro_export]
macro_rules! decimal_digit_char {
($c: expr) => {
- $c >= '0' && $c <= '9'
+ ('0'..='9').contains(&$c)
};
}
