These are chat archives for kbknapp/clap-rs

28th
Mar 2018
Mikhail Trishchenkov
@kriomant
Mar 28 2018 04:06
Hello all. I used to use value_t! macro to convert argument to target type, but now I want to handle absence of argument. Why isn't opt_value_t! returning Result<Option<T>, clap::Error> available? Is it by design and I should check presence in advance with is_present, or it is just unintentionally missing?
Kevin K.
@kbknapp
Mar 28 2018 17:16
value_t! gives back a None if there are no values, but if all you want is to see if it was used, ArgMatches::is_present is the only way (however value_t! will give back None if the arg wasn't used too)