mirror of
https://github.com/mat-1/azalea.git
synced 2024-09-19 22:52:32 +00:00
allow trailing commas in declare_state_packets
This commit is contained in:
parent
58e58dfa8f
commit
a45eb6deb2
1 changed files with 4 additions and 1 deletions
|
@ -150,13 +150,16 @@ impl Parse for PacketIdMap {
|
|||
input.parse::<Token![::]>()?;
|
||||
// ClientboundChangeDifficultyPacket
|
||||
let name: Ident = input.parse()?;
|
||||
input.parse::<Token![,]>()?;
|
||||
|
||||
packets.push(PacketIdPair {
|
||||
id: packet_id,
|
||||
module,
|
||||
name,
|
||||
});
|
||||
|
||||
if input.parse::<Token![,]>().is_err() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Ok(PacketIdMap { packets })
|
||||
|
|
Loading…
Reference in a new issue