Repository navigation
[Variant] Add ObjectBuilder::with_field for convenience - #7950
Merged
Merged
Conversation
alamb
force-pushed
the
alamb/object_builder_with_field
branch
from
July 17, 2025 15:10
b3d22da to
395dd5e
Compare
codephage2020
approved these changes
Jul 18, 2025
Contributor
There was a problem hiding this comment.
Thank you for your excellent suggestions and PR! They helped me complete this #7959 much faster. Really appreciate it! 🚀
By the way, should the new API be recommended as a preference? If so, we need to modify some examples, such as:
Contributor
Author
I am not sure -- I suspect different people will have different preferences. If you would like to update the examples I would be happy to review the pR |
Contributor
Author
|
Thanks for the review @codephage2020 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
ObjectBuilder::with_fieldfor convenience #7949Rationale for this change
I would like it to be easier / more ergonomic to make objects
What changes are included in this PR?
ObjectBuilder::with_fieldAre these changes tested?
Yes, by doc tests
Are there any user-facing changes?
Yes a new API