Mercurial > public > mercurial-scm > hg-stable
diff rust/rhg/src/commands/root.rs @ 49758:37bc3edef76f
rhg: upgrade `clap` dependency
This one is the worst one to upgrade since v2 -> v4 broke a ton of API,
which thankfully seems saner now.
Contrary to what was done in the `hg-core/src/examples/nodemap` rewrite,
we're not switching from the "builder" pattern to the "derive" pattern,
since that would imply a much larger diff. It can be done incrementally.
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Tue, 15 Nov 2022 00:02:43 +0100 |
parents | 97ac588b6d9e |
children | 532e74ad3ff6 |
line wrap: on
line diff
--- a/rust/rhg/src/commands/root.rs Mon Nov 14 17:18:56 2022 +0100 +++ b/rust/rhg/src/commands/root.rs Tue Nov 15 00:02:43 2022 +0100 @@ -9,8 +9,8 @@ Returns 0 on success. "; -pub fn args() -> clap::App<'static, 'static> { - clap::SubCommand::with_name("root").about(HELP_TEXT) +pub fn args() -> clap::Command { + clap::command!("root").about(HELP_TEXT) } pub fn run(invocation: &crate::CliInvocation) -> Result<(), CommandError> {