-
Hi, I'm trying to upgrade To reproduce the issue, here is a simple example that works fine with use clap::{Arg, Command};
fn main() {
let res = Command::new("myprog")
.arg(Arg::new("num").allow_negative_numbers(true))
.try_get_matches_from(vec!["myprog", "-.1"]);
assert!(res.is_ok());
let m = res.unwrap();
assert_eq!(m.get_one::<String>("num").unwrap(), "-.1");
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Our "is number" check is at Lines 492 to 522 in 5babafd A year ago, #5181 was merged to reduce the code size by avoiding the expense of Huh, hadn't realized that Rust supports If/when someone fixes this, we should probably add a basic property test that anything a float parser can parse, we can parse also. |
Beta Was this translation helpful? Give feedback.
Our "is number" check is at
clap/clap_lex/src/lib.rs
Lines 492 to 522 in 5babafd