1
0
mirror of https://github.com/rust-lang/rustlings.git synced 2024-09-07 20:02:17 +02:00

Change condition order

This commit is contained in:
mo8it 2024-06-01 15:10:43 +02:00
parent c324ea10df
commit 8e9c99ae5b

View File

@ -14,7 +14,7 @@ use crate::{
// Find a char that isn't allowed in the exercise's `name` or `dir`.
fn forbidden_char(input: &str) -> Option<char> {
input.chars().find(|c| *c != '_' && !c.is_alphanumeric())
input.chars().find(|c| !c.is_alphanumeric() && *c != '_')
}
// Check the info of all exercises and return their paths in a set.