mirror of
https://github.com/bevyengine/bevy
synced 2024-12-18 09:03:07 +00:00
BrpQueryRow has field deserialization fix (#16613)
# Objective BrpQueryRow doesn't serialize `has` field if it is empty. That is okay until you try to deserialize it after. Then it will fail to deserialize due to missing field. ## Solution Serde support using default value when field is missing, this PR adds that.
This commit is contained in:
parent
7dfc77b999
commit
f59ae0f5e8
1 changed files with 1 additions and 1 deletions
|
@ -304,7 +304,7 @@ pub struct BrpQueryRow {
|
||||||
pub components: HashMap<String, Value>,
|
pub components: HashMap<String, Value>,
|
||||||
|
|
||||||
/// The boolean-only containment query results.
|
/// The boolean-only containment query results.
|
||||||
#[serde(skip_serializing_if = "HashMap::is_empty")]
|
#[serde(skip_serializing_if = "HashMap::is_empty", default)]
|
||||||
pub has: HashMap<String, Value>,
|
pub has: HashMap<String, Value>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue