remove canhazslicepatterns
authoralfadur
Wed, 11 Mar 2020 23:20:15 +0300
changeset 15548 e1c2ca38e511
parent 15547 863059f61793
child 15549 608b5de819a5
remove canhazslicepatterns
rust/hedgewars-server/src/handlers/inroom.rs
--- a/rust/hedgewars-server/src/handlers/inroom.rs	Sat Mar 07 01:04:37 2020 +0300
+++ b/rust/hedgewars-server/src/handlers/inroom.rs	Wed Mar 11 23:20:15 2020 +0300
@@ -48,7 +48,6 @@
     b"M#+LlRrUuDdZzAaSjJ,NpPwtgfhbc12345\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A";
 const NON_TIMED_MESSAGES: &[u8] = b"M#hb";
 
-#[cfg(canhazslicepatterns)]
 fn is_msg_valid(msg: &[u8], team_indices: &[u8]) -> bool {
     match msg {
         [size, typ, body @ ..] => {
@@ -64,14 +63,6 @@
     }
 }
 
-fn is_msg_valid(msg: &[u8], _team_indices: &[u8]) -> bool {
-    if let Some(typ) = msg.get(1) {
-        VALID_MESSAGES.contains(typ)
-    } else {
-        false
-    }
-}
-
 fn is_msg_empty(msg: &[u8]) -> bool {
     msg.get(1).filter(|t| **t == b'+').is_some()
 }