Closed haoqixu closed 1 week ago
Avoid panic on out-of-bounds indexing when parsing incomplete expressions.
You can add a test case like assert_snapshot!(parse_crontab("0").unwrap_err()); to parse_crontab_failed.
assert_snapshot!(parse_crontab("0").unwrap_err());
parse_crontab_failed
or throw error on find(' ') return None instead of unwrap_or.
find(' ')
unwrap_or
Avoid panic on out-of-bounds indexing when parsing incomplete expressions.