[robot-name] Clippy says to use ('A'..='Z').contains(x)
@@ -3,11 +3,11 @@ use robot_name as robot;
fn assert_name_matches_pattern(n: &str) {
assert!(n.len() == 5, "name is exactly 5 characters long");
assert!(
- n[0..2].chars().all(|c| c >= 'A' && c <= 'Z'),
+ n[0..2].chars().all(|c| ('A'..='Z').contains(&c)),
"name starts with 2 uppercase letters"
);
assert!(
- n[2..].chars().all(|c| c >= '0' && c <= '9'),
+ n[2..].chars().all(|c| ('0'..='9').contains(&c)),
"name ends with 3 numbers"
);
}
