From 8e9c99ae5bfd9212c7d2a2c78186ab82133e69c7 Mon Sep 17 00:00:00 2001 From: mo8it Date: Sat, 1 Jun 2024 15:10:43 +0200 Subject: [PATCH] Change condition order --- src/dev/check.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dev/check.rs b/src/dev/check.rs index 7c35b4f3..59352e96 100644 --- a/src/dev/check.rs +++ b/src/dev/check.rs @@ -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 { - 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.