Mercurial > public > mercurial-scm > hg
diff rust/rhg/src/error.rs @ 46591:21d3b40b4c0e
rhg: Remove error message on unsupported CLI arguments
Like in other "unsupported" cases that return a specific exit code
Differential Revision: https://phab.mercurial-scm.org/D10002
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Fri, 12 Feb 2021 16:54:30 +0100 |
parents | d8730ff51d5a |
children | 5ce2aa7c2ad5 |
line wrap: on
line diff
--- a/rust/rhg/src/error.rs Tue Jan 05 21:46:21 2021 +0100 +++ b/rust/rhg/src/error.rs Fri Feb 12 16:54:30 2021 +0100 @@ -33,6 +33,14 @@ } } +/// For now we don’t differenciate between invalid CLI args and valid for `hg` +/// but not supported yet by `rhg`. +impl From<clap::Error> for CommandError { + fn from(_: clap::Error) -> Self { + CommandError::Unimplemented + } +} + impl From<HgError> for CommandError { fn from(error: HgError) -> Self { match error {