baoyachi/duration-str

Make it work with StructOpt

venil7 opened this issue · 1 comments

 #[structopt(short, long, parse(/*a structopt compatible parser*/))]
    pub duration: Duration,
use duration_str::parse as parse_duration;

turns out you can do parse(try_from_str=parse_duration),