mirror of
https://git.aramjonghu.dev/AramJonghu/rustlings.git
synced 2026-09-06 10:03:30 +02:00
Change condition order
This commit is contained in:
+1
-1
@@ -14,7 +14,7 @@ use crate::{
|
|||||||
|
|
||||||
// Find a char that isn't allowed in the exercise's `name` or `dir`.
|
// Find a char that isn't allowed in the exercise's `name` or `dir`.
|
||||||
fn forbidden_char(input: &str) -> Option<char> {
|
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.
|
// Check the info of all exercises and return their paths in a set.
|
||||||
|
|||||||
Reference in New Issue
Block a user