diff options
author | metamuffin <metamuffin@disroot.org> | 2024-06-18 12:39:55 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-06-23 19:21:22 +0200 |
commit | fb96a40f728137df0566bac8cdb933549a42bfc6 (patch) | |
tree | a85ad14e220c3b9acafc9b3f0aa1b34484f8cee5 /server/src/protocol.rs | |
parent | b8b7b5532a9826b7ebd28ae759aa3ff719a43449 (diff) | |
download | hurrycurry-fb96a40f728137df0566bac8cdb933549a42bfc6.tar hurrycurry-fb96a40f728137df0566bac8cdb933549a42bfc6.tar.bz2 hurrycurry-fb96a40f728137df0566bac8cdb933549a42bfc6.tar.zst |
changed protocol enums to internally tagged
Diffstat (limited to 'server/src/protocol.rs')
-rw-r--r-- | server/src/protocol.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/src/protocol.rs b/server/src/protocol.rs index ef731b0d..3a40059a 100644 --- a/server/src/protocol.rs +++ b/server/src/protocol.rs @@ -9,7 +9,7 @@ pub type TileIndex = usize; pub type RecipeIndex = usize; #[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(rename_all = "snake_case")] +#[serde(rename_all = "snake_case", tag = "type")] pub enum PacketS { Join { name: String }, Leave, @@ -18,7 +18,7 @@ pub enum PacketS { } #[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(rename_all = "snake_case")] +#[serde(rename_all = "snake_case", tag = "type")] pub enum PacketC { Joined { data: Gamedata, |