Skip to content

Commit

Permalink
impl Default for gltf_json::Node.
Browse files Browse the repository at this point in the history
Since `Node`s are generally expected to have only a few non-absent
fields, providing this `Default` implementation will allow code that is
generating `Node`s to be much more concise.
  • Loading branch information
kpreid committed Dec 18, 2023
1 parent c17732e commit 25fd1a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gltf-json/src/scene.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use serde_derive::{Deserialize, Serialize};
/// identity. When a node is targeted for animation (referenced by an
/// animation.channel.target), only TRS properties may be present; `matrix` will not
/// be present.
#[derive(Clone, Debug, Deserialize, Serialize, Validate)]
#[derive(Clone, Debug, Default, Deserialize, Serialize, Validate)]
pub struct Node {
/// The index of the camera referenced by this node.
#[serde(skip_serializing_if = "Option::is_none")]
Expand Down

0 comments on commit 25fd1a7

Please sign in to comment.