diff options
| author | nokoe <nokoe@mailbox.org> | 2026-02-27 19:41:22 +0100 |
|---|---|---|
| committer | nokoe <nokoe@mailbox.org> | 2026-02-27 19:41:22 +0100 |
| commit | c1a20426838a5729c2c874eae73dbb974fcf7906 (patch) | |
| tree | 7138b1a4ca5f7f6b561aa05b0aae05071c581084 /server/src/state.rs | |
| parent | 70e6d510ba236730260371a3259ffb16f999f5d4 (diff) | |
| parent | a859bceeddc8e746bba630b3cc197532b68adbcb (diff) | |
| download | hurrycurry-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.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 { |