]> git.scottworley.com Git - voter/commitdiff
Appease clippy
authorScott Worley <scottworley@scottworley.com>
Sun, 7 Apr 2024 12:40:23 +0000 (05:40 -0700)
committerScott Worley <scottworley@scottworley.com>
Sun, 7 Apr 2024 13:13:09 +0000 (06:13 -0700)
src/main.rs

index 865fcb864ec5bf6497a6ac96c42d9174030345d5..8c94be10909277a1c271c0ecd856e7f04b118730 100644 (file)
@@ -82,7 +82,7 @@ fn tally_votes(dir: &Path) -> std::io::Result<HashMap<String, HashSet<String>>>
 }
 
 fn valid_id_char(c: u8) -> bool {
 }
 
 fn valid_id_char(c: u8) -> bool {
-    (b'A'..=b'Z').contains(&c) || (b'a'..=b'z').contains(&c) || (b'0'..=b'9').contains(&c)
+    c.is_ascii_alphanumeric()
 }
 
 fn make_random_id() -> [u8; COOKIE_LENGTH] {
 }
 
 fn make_random_id() -> [u8; COOKIE_LENGTH] {