mirror of
https://github.com/rust-lang/rustlings.git
synced 2025-12-21 23:57:30 +02:00
Change condition order
This commit is contained in:
@@ -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