Skip to content

Refactor how CLI args are applied to Builder #2984

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 4 commits into from
Nov 22, 2024

Conversation

pvdrz
Copy link
Contributor

@pvdrz pvdrz commented Nov 20, 2024

These changes abstract away the most commonly used patterns to apply CLI args to the Builder:

if bool_cli_arg {
    builder = builder.method(bool_cli_arg);
}
if let Some(value) = option_cli_arg {
    builder = builder.method(value);
}
for value in vec_cli_arg {
    builder = builder.method(value);
}

@pvdrz pvdrz force-pushed the pvdrz/refactor-cli-arg-application branch 2 times, most recently from 126f869 to 9da8f7b Compare November 21, 2024 19:51
@pvdrz pvdrz force-pushed the pvdrz/refactor-cli-arg-application branch from 9da8f7b to 3bd911e Compare November 21, 2024 20:05
@pvdrz pvdrz added this pull request to the merge queue Nov 22, 2024
Merged via the queue into main with commit 713dbda Nov 22, 2024
28 checks passed
heftig added a commit to heftig/rust-bindgen that referenced this pull request Dec 7, 2024
This regressed again in rust-lang#2984. Partially revert d75fe27 and
42a86e2 and restore the previous behavior.

Fixes: rust-lang#3037
Fixes: rust-lang#3039
github-merge-queue bot pushed a commit that referenced this pull request Dec 8, 2024
This regressed again in #2984. Partially revert d75fe27 and
42a86e2 and restore the previous behavior.

Fixes: #3037
Fixes: #3039
@pvdrz pvdrz deleted the pvdrz/refactor-cli-arg-application branch December 9, 2024 04:30
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.

1 participant