# HG changeset patch # User alfadur # Date 1583958015 -10800 # Node ID e1c2ca38e511d8097eefdf075a8472f96767a7ab # Parent 863059f61793dabba93dde88c22d8cd5d7f3a5ec remove canhazslicepatterns diff -r 863059f61793 -r e1c2ca38e511 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() }