From a45eb6deb27b8623c3d3ba9b5e21cc638272f5c8 Mon Sep 17 00:00:00 2001 From: mat Date: Tue, 19 Apr 2022 20:37:42 -0500 Subject: [PATCH] allow trailing commas in declare_state_packets --- azalea-protocol/packet-macros/src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/azalea-protocol/packet-macros/src/lib.rs b/azalea-protocol/packet-macros/src/lib.rs index 3cc3677a..d7f54d84 100644 --- a/azalea-protocol/packet-macros/src/lib.rs +++ b/azalea-protocol/packet-macros/src/lib.rs @@ -150,13 +150,16 @@ impl Parse for PacketIdMap { input.parse::()?; // ClientboundChangeDifficultyPacket let name: Ident = input.parse()?; - input.parse::()?; packets.push(PacketIdPair { id: packet_id, module, name, }); + + if input.parse::().is_err() { + break; + } } Ok(PacketIdMap { packets })