rust/hedgewars-server/src/utils.rs
changeset 15031 a479916799ea
parent 14835 8ddb5842fe0b
child 15448 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