1
0
Fork 0
mirror of https://codeberg.org/demostf/parser.git synced 2026-10-01 08:44:05 +02:00

Derive PartialEq for send prop definitions

Needed to tell whether editing a send table actually changed how its
props encode.
This commit is contained in:
Peter 2026-09-07 10:09:11 +01:00
commit 892b713acc

View file

@ -386,7 +386,7 @@ impl BitWrite<LittleEndian> for SendPropFlags {
} }
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum FloatDefinition { pub enum FloatDefinition {
Coord, Coord,
CoordMP, CoordMP,
@ -429,7 +429,7 @@ impl FloatDefinition {
} }
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SendPropDefinition { pub struct SendPropDefinition {
pub identifier: SendPropIdentifier, pub identifier: SendPropIdentifier,
pub parse_definition: SendPropParseDefinition, pub parse_definition: SendPropParseDefinition,
@ -448,7 +448,7 @@ impl TryFrom<&RawSendPropDefinition> for SendPropDefinition {
} }
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum SendPropParseDefinition { pub enum SendPropParseDefinition {
NormalVarInt { NormalVarInt {
changes_often: bool, changes_often: bool,