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:
parent
58e58dfa8f
commit
a45eb6deb2
1 changed files with 4 additions and 1 deletions
|
@ -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 })
|
||||||
|
|
Loading…
Add table
Reference in a new issue