diff options
Diffstat (limited to 'server/src/state.rs')
| -rw-r--r-- | server/src/state.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/src/state.rs b/server/src/state.rs index 9c5bfb6b..70c5b7f1 100644 --- a/server/src/state.rs +++ b/server/src/state.rs @@ -175,8 +175,9 @@ impl Server { timeout: None, player, .. - } if let Some(command) = text.strip_prefix("/") => { - match self.handle_command_parse(*player, command) { + } if text.strip_prefix("/").is_some() => { + // TODO: replace this by if let guard when stable + match self.handle_command_parse(*player, text.strip_prefix("/").unwrap()) { Ok(packets) => return Ok(packets), Err(e) => { return Ok(vec![PacketC::ServerMessage { |