-
-
Notifications
You must be signed in to change notification settings - Fork 358
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
refactor: Update to clap 4 #584
Conversation
Thank you very much for your contribution! The "Min. supported rust version" check currently fails. We might need to bump the min. supported Rust version (in
Well... hopefully not. Do you have any suspicions? Maybe parts of your changes where you're not 100% sure that the migration did the right thing? If so, we should at least check manually. Or add more integration tests, ideally.
Okay. I guess that could be done later? |
src/command.rs
Outdated
@@ -148,7 +154,7 @@ impl<'a> Commands<'a> { | |||
bail!("Duplicate parameter names: {}", &duplicates.join(", ")); | |||
} | |||
} | |||
let command_list = command_strings.collect::<Vec<&str>>(); | |||
let command_list = command_strings; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm. Do we need both? Or could we use command_list
above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the unneeded command_list variables
The MSRV of clap v4 is 1.60.0, so I bumped it to that version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Closes #578
default-features = false
.max_term_width(90)
in favor of wrap_help.--help
has some subtle changes, that all seem good, reducing the total output size from 161 lines to 133 lines (with equal widthCOLUMNS=90
).TODO:
arg!
that could simplify things, but these are not used here.clap v3
hyperfine --help
clap v4
cargo run -- hyperfine --help