1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 14:26:04 +00:00

allow trailing commas in declare_state_packets

This commit is contained in:
mat 2022-04-19 20:37:42 -05:00
parent 58e58dfa8f
commit a45eb6deb2

View file

@ -150,13 +150,16 @@ impl Parse for PacketIdMap {
input.parse::<Token![::]>()?; input.parse::<Token![::]>()?;
// ClientboundChangeDifficultyPacket // ClientboundChangeDifficultyPacket
let name: Ident = input.parse()?; let name: Ident = input.parse()?;
input.parse::<Token![,]>()?;
packets.push(PacketIdPair { packets.push(PacketIdPair {
id: packet_id, id: packet_id,
module, module,
name, name,
}); });
if input.parse::<Token![,]>().is_err() {
break;
}
} }
Ok(PacketIdMap { packets }) Ok(PacketIdMap { packets })