aboutsummaryrefslogtreecommitdiff
path: root/server/src/state.rs
diff options
context:
space:
mode:
authornokoe <nokoe@mailbox.org>2026-02-26 05:15:54 +0100
committernokoe <nokoe@mailbox.org>2026-02-27 19:31:14 +0100
commita859bceeddc8e746bba630b3cc197532b68adbcb (patch)
treef8e033595d21e4de34774e4caed8b483c7eba5c6 /server/src/state.rs
parent6419d8c8139d697af309b7db2e698effa8290582 (diff)
downloadhurrycurry-a859bceeddc8e746bba630b3cc197532b68adbcb.tar
hurrycurry-a859bceeddc8e746bba630b3cc197532b68adbcb.tar.bz2
hurrycurry-a859bceeddc8e746bba630b3cc197532b68adbcb.tar.zst
use stable rust toolchainstable-rust
Diffstat (limited to 'server/src/state.rs')
-rw-r--r--server/src/state.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/src/state.rs b/server/src/state.rs
index 1bddf33c..937d5a24 100644
--- a/server/src/state.rs
+++ b/server/src/state.rs
@@ -174,8 +174,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 {