Skip to content

Implement Clone for Builder #2302

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

Merged
merged 1 commit into from
Oct 12, 2022
Merged

Conversation

pvdrz
Copy link
Contributor

@pvdrz pvdrz commented Oct 7, 2022

This is done by moving all the remaining Builder state into BindgenOptions so any internal logic that affects Builder state only runs once the builder is consumed by Builder::generate:

  • move input_headers to BindgenOptions.
  • move input_header_contents to BindgenOptions.
  • derive Clone for Builder.

Fixes: #2132

This is done by moving all the remaining `Builder` state into
`BindgenOptions` so any internal logic that affects `Builder` state only
runs once the builder is consumed by `Builder::generate`:

- move `input_headers` to `BindgenOptions`.
- move `input_header_contents` to `BindgenOptions`.
- derive `Clone` for `Builder`.
@pvdrz pvdrz force-pushed the clonable-builder branch from 94d4313 to 46cd3af Compare October 7, 2022 19:10
@pvdrz pvdrz merged commit 626797b into rust-lang:master Oct 12, 2022
@pvdrz pvdrz deleted the clonable-builder branch October 12, 2022 16:07
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.

implement Clone on Builder
1 participant