Make the parse module public, allowing parse::Error to be matched on.
For example, now
use parse_duration::parse;
let input = "1e100 seconds";
if let Err(parse::Error::OutOfBounds(_)) = parse(input) {
println!("The input was too big");
} else {
panic!("The input wasn't too big");
}
Make the
parse
module public, allowingparse::Error
to be matched on.For example, now
will work.