1
0
mirror of https://github.com/bspeice/dtparse synced 2025-07-01 13:56:12 -04:00

Remove a last println and use a static default parser

Heap profilers are fun
This commit is contained in:
2018-09-17 22:19:30 -04:00
parent 4d7c5dd995
commit 741afa3451
5 changed files with 11 additions and 9 deletions

View File

@ -16,7 +16,7 @@ fn test_fuzz() {
// OverflowError: Python int too large to convert to C long
// assert_eq!(parse("8888884444444888444444444881"), Err(ParseError::AmPmWithoutHour));
let default = NaiveDate::from_ymd(2016, 6, 29).and_hms(0, 0, 0);
let mut p = Parser::default();
let p = Parser::default();
let res = p.parse("\x0D\x31", None, None, false, false, Some(&default), false, &HashMap::new()).unwrap();
assert_eq!(res.0, default);