rust/hedgewars-server/src/utils.rs
changeset 15031 8cde6fb2fabd
parent 15026 a479916799ea
child 15443 eb1c407a9e8f
--- a/rust/hedgewars-server/src/utils.rs	Wed May 22 23:30:10 2019 +0200
+++ b/rust/hedgewars-server/src/utils.rs	Wed May 22 23:32:22 2019 +0200
@@ -14,7 +14,7 @@
         || name.trim() != name
         || name
             .chars()
-            .any(|c| "$()*+?[]^{|}\x7F".contains(c) || '\x00' <= c && c <= '\x1F')
+            .any(|c| "$()*+?[]^{|}\x7F".contains(c) || ('\x00'..='\x1F').contains(&c))
 }
 
 pub fn to_engine_msg<T>(msg: T) -> String