aboutsummaryrefslogtreecommitdiff
path: root/server/src/state.rs
diff options
context:
space:
mode:
authornokoe <nokoe@mailbox.org>2026-02-27 19:41:22 +0100
committernokoe <nokoe@mailbox.org>2026-02-27 19:41:22 +0100
commitc1a20426838a5729c2c874eae73dbb974fcf7906 (patch)
tree7138b1a4ca5f7f6b561aa05b0aae05071c581084 /server/src/state.rs
parent70e6d510ba236730260371a3259ffb16f999f5d4 (diff)
parenta859bceeddc8e746bba630b3cc197532b68adbcb (diff)
downloadhurrycurry-c1a20426838a5729c2c874eae73dbb974fcf7906.tar
hurrycurry-c1a20426838a5729c2c874eae73dbb974fcf7906.tar.bz2
hurrycurry-c1a20426838a5729c2c874eae73dbb974fcf7906.tar.zst
Merge branch 'stable-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 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 {