From 2c2964e4ed60d54028b672e7089e1c5a05fa1939 Mon Sep 17 00:00:00 2001 From: Cory Carson <192271027+ccarson-sfpublic@users.noreply.github.com> Date: Mon, 30 Dec 2024 13:56:22 -0800 Subject: [PATCH] RECENTDAYS parsing error Fix for thread 'main' panicked at src/bin/choctaw_hog.rs:105:54: Mismatch between definition and access of `RECENTDAYS`. Could not downcast to u32, need to downcast to alloc::string::String --- src/bin/choctaw_hog.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/choctaw_hog.rs b/src/bin/choctaw_hog.rs index 54b7d32..65c15ba 100644 --- a/src/bin/choctaw_hog.rs +++ b/src/bin/choctaw_hog.rs @@ -68,7 +68,7 @@ fn main() { .arg(Arg::new("SSHKEYPHRASE").long("sshkeyphrase").action(ArgAction::Set).help("Takes a passphrase to a private SSH key for git authentication, defaults to none")) .arg(Arg::new("HTTPSUSER").long("httpsuser").action(ArgAction::Set).help("Takes a username for HTTPS-based authentication")) .arg(Arg::new("HTTPSPASS").long("httpspass").action(ArgAction::Set).help("Takes a password for HTTPS-based authentication")) - .arg(Arg::new("RECENTDAYS").long("recent_days").action(ArgAction::Set).conflicts_with("SINCECOMMIT").help("Filters commits to the last number of days (branch agnostic)")) + .arg(Arg::new("RECENTDAYS").long("recent_days").action(ArgAction::Set).value_parser(clap::value_parser!(u32)).conflicts_with("SINCECOMMIT").help("Filters commits to the last number of days (branch agnostic)")) .arg(Arg::new("ALLOWLIST").short('a').long("allowlist").action(ArgAction::Set).help("Sets a custom allowlist JSON file")) .get_matches(); match run(&matches) {