Skip to content

Conversation

@CasperN
Copy link
Collaborator

@CasperN CasperN commented Feb 5, 2021

Previously when you called FooT::default() it will return the object with all fields set to something zero-like, which is the behavior of Rust's derive(Default). However, it should have been based on the schema, so I updated it accordingly.

I noticed this when implementing #6421 for #6053 and made it a separate PR to keep the diffs small.

@github-actions github-actions bot added c++ codegen Involving generating code from schema rust labels Feb 5, 2021
@aardappel
Copy link
Collaborator

Generally looks nice!

@CasperN CasperN merged commit 6f3e45e into google:master Feb 7, 2021
@CasperN CasperN deleted the objdef branch February 7, 2021 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ codegen Involving generating code from schema rust

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants