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

Missing #[builder(default)] on builder impls #33

Closed
tychedelia opened this issue Sep 16, 2023 · 2 comments · Fixed by #34
Closed

Missing #[builder(default)] on builder impls #33

tychedelia opened this issue Sep 16, 2023 · 2 comments · Fixed by #34
Assignees

Comments

@tychedelia
Copy link
Owner

See colin-kiegel/rust-derive-builder#261.

@rukai
Copy link
Collaborator

rukai commented Sep 16, 2023

Ooooh, does this fix the issue where literally every field of the builder needs to be set? I didn't think to report it as an issue but did think it was a strange design 😅

@tychedelia
Copy link
Owner Author

Ooooh, does this fix the issue where literally every field of the builder needs to be set? I didn't think to report it as an issue but did think it was a strange design 😅

Yes! I thought this was just a design oversight too, but dug deeper. Seems a bit strange this isn't the default behavior, as I can't imagine a situation where you wouldn't want to fall back to default. In general, I find the builders much more ergonomic then changing a bunch of mutable fields, particularly after we decided to make all the messages non-exhaustive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants