Mercurial > hg
comparison rust/rhg/src/commands/debugrequirements.rs @ 49640: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 | 5ce2aa7c2ad5 |
children |
comparison
equal
deleted
inserted
replaced
49639:5844cd8e81ca | 49640:37bc3edef76f |
---|---|
2 | 2 |
3 pub const HELP_TEXT: &str = " | 3 pub const HELP_TEXT: &str = " |
4 Print the current repo requirements. | 4 Print the current repo requirements. |
5 "; | 5 "; |
6 | 6 |
7 pub fn args() -> clap::App<'static, 'static> { | 7 pub fn args() -> clap::Command { |
8 clap::SubCommand::with_name("debugrequirements").about(HELP_TEXT) | 8 clap::command!("debugrequirements").about(HELP_TEXT) |
9 } | 9 } |
10 | 10 |
11 pub fn run(invocation: &crate::CliInvocation) -> Result<(), CommandError> { | 11 pub fn run(invocation: &crate::CliInvocation) -> Result<(), CommandError> { |
12 let repo = invocation.repo?; | 12 let repo = invocation.repo?; |
13 let mut output = String::new(); | 13 let mut output = String::new(); |