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

#208 v2 #209

Closed
wants to merge 3 commits into from
Closed

Conversation

nabijaczleweli
Copy link
Collaborator

See bits with [] for changes to original.

[#[rustfmt::skip] moved, attributes on expressions are experimental error]
[<String>+.clone() -> <&str>+.to_string() removes a copy]
[Drop indep]

Version 2 is really old. We can update to 3 very easily. But it seems 4 will
require some changes, so let's do that in a separate step. This is what
https://github.com/clap-rs/clap/blob/v4.5.21/CHANGELOG.md#migrating recommends.
This changes the organization of the arguments and strictly speaking is an
incompatible change. Before, the device argument could be specified before
--reset-device or --setup-device, but now it must be after the option name.
I think this is an acceptable change, because this isn't really a public
interface and this is the natural way to specify this. This way the setup
is simpler and easier to understand at a glance.

I added #[rustfmt::skip] because the formatter insists on squishing some
arg descriptions into a single line which doesn't look good and also
indents the modifiers after '--setup-device' and 'dir' options differently
for some reason.

[#[rustfmt::skip] moved, attributes on expressions are experimental error]
[<String>+.clone() -> <&str>+.to_string() removes a copy]
The generated output is not very readable. We can do better by providing
a custom string. This makes the binary smaller too.

[Drop indep]
@keszybz
Copy link
Member

keszybz commented Nov 27, 2024

Oh, I missed the updates here. I'll update the PR in a sec.

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

Successfully merging this pull request may close these issues.

2 participants