feat(api)!: use bon to derive builder methods on core structs#322
Closed
feat(api)!: use bon to derive builder methods on core structs#322
bon to derive builder methods on core structs#322Conversation
Co-authored-by: KSXGitHub <11488886+KSXGitHub@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Use bon to convert structs into builder functions
feat(api)!: use Feb 28, 2026
bon to derive builder methods on core structs
Owner
|
@copilot Does the test files also make use of these structs? If they do, I would like you to update them as well. |
Performance Regression Reportscommit: c32d5e3 There are no regressions. |
…Visualizer in test files Co-authored-by: KSXGitHub <11488886+KSXGitHub@users.noreply.github.com>
Contributor
Author
Yes, the test files did use these structs. Updated all usages in commit 3cc45c5:
|
Owner
|
@copilot The master branch has just been updated. |
d328df6 to
3645048
Compare
Owner
|
Wrong idea. |
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.
boncrate dependency toCargo.toml#[derive(Builder)]tovisualizer::Visualizer#[derive(Builder)]tofs_tree_builder::FsTreeBuilder#[derive(Builder)]totree_builder::TreeBuilder#[derive(Builder)]toapp::sub::Subtests/_utils.rsto useFsTreeBuilder::builder()tests/tree_builder.rsto useTreeBuilder::builder()tests/visualizer.rsto useVisualizer::builder()in the test macrotests/json.rsto useFsTreeBuilder::builder()andVisualizer::builder()tests/cli_errors.rsto useFsTreeBuilder::builder()andVisualizer::builder()tests/usual_cli.rsto useFsTreeBuilder::builder()andVisualizer::builder()(18 occurrences each)src/usage_md.rs,cli/usage_md.rs, sync tests, updated exports)Original prompt
bonto convert some structs into a builder function #299✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.