Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

impl Default for gltf_json::Node. #403

Merged
merged 1 commit into from
Dec 20, 2023
Merged

impl Default for gltf_json::Node. #403

merged 1 commit into from
Dec 20, 2023

Conversation

kpreid
Copy link
Contributor

@kpreid kpreid commented Dec 18, 2023

Since Nodes are generally expected to have only a few non-absent fields, providing this Default implementation will allow code that is generating Nodes to be much more concise.

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.
@alteous
Copy link
Member

alteous commented Dec 20, 2023

The original reason why Node didn't have a Default implementation was because an empty node is invalid. I think there are better ways of avoiding this though so LGTM. 👍

@alteous alteous merged commit 5647436 into gltf-rs:main Dec 20, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants