fix placeholder error message

This commit is contained in:
figsoda 2022-12-30 10:57:55 -05:00
parent c8d3a7e0b5
commit 6fc0d29d5e
2 changed files with 7 additions and 3 deletions

View File

@ -21,7 +21,7 @@ pub struct Opts {
pub indent: usize,
}
#[derive(Clone, ValueEnum)]
#[derive(Clone, Debug, ValueEnum)]
#[clap(rename_all = "camelCase")]
pub enum Fetcher {
FetchFromGitHub,

View File

@ -48,10 +48,14 @@ fn main() -> Result<()> {
}
(
Some(Fetcher::FetchFromGitHub | Fetcher::FetchFromGitLab | Fetcher::FetchFromSourcehut),
Some(
fetcher @ (Fetcher::FetchFromGitHub
| Fetcher::FetchFromGitLab
| Fetcher::FetchFromSourcehut),
),
None,
) => {
bail!("bad");
bail!("{fetcher:?} does not support URLs without a host");
}
(Some(Fetcher::Fetchgit), _) | (None, _) => {