rust/hedgewars-server/src/utils.rs
changeset 15026 a479916799ea
parent 14830 8ddb5842fe0b
child 15443 eb1c407a9e8f
--- a/rust/hedgewars-server/src/utils.rs	Wed May 22 22:42:20 2019 +0300
+++ b/rust/hedgewars-server/src/utils.rs	Wed May 22 23:05:55 2019 +0300
@@ -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