chrono/src/format
Michal Srb 6da5359d39 Reimplement scan::number
The original would first check that there is right amount of numeric
characters and then parsed them using the std::str::parse, which
internally checks the characters again and also checks for -/+ prefix,
which is not necessary in this case.

Since we are already going over the characters, we may as well do the
parsing ourselves. The length of the function is roughly the same and
it is faster:

 name                                                 simplify-from-str ns/iter  reimplement-number ns/iter  diff ns/iter   diff %  speedup
 datetime::tests::bench_datetime_from_str             448                        365                                  -83  -18.53%   x 1.23
 datetime::tests::bench_datetime_parse_from_rfc2822   242                        195                                  -47  -19.42%   x 1.24
 datetime::tests::bench_datetime_parse_from_rfc3339   234                        166                                  -68  -29.06%   x 1.41
2019-11-23 23:34:59 +01:00
..
mod.rs Accept Borrow<Item> as items 2019-11-23 23:34:59 +01:00
parse.rs Accept Borrow<Item> as items 2019-11-23 23:34:59 +01:00
parsed.rs Only parse up to max number of digits for nanoseconds w/o dots 2018-06-12 10:51:38 -04:00
scan.rs Reimplement scan::number 2019-11-23 23:34:59 +01:00
strftime.rs Use markdown footnotes in strftime docs 2019-11-22 11:30:10 -05:00