mirror of
https://github.com/rust-lang/rustlings.git
synced 2024-12-27 15:56:28 +00:00
Change condition order
This commit is contained in:
parent
c324ea10df
commit
8e9c99ae5b
1 changed files with 1 additions and 1 deletions
|
@ -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.
|
||||||
|
|
Loading…
Reference in a new issue