refactor: cleanup utils macros

This commit is contained in:
PoiScript 2019-02-07 15:54:16 +08:00
parent 346ebc83d7
commit 0b355b498c
18 changed files with 285 additions and 297 deletions

View file

@ -15,7 +15,7 @@ impl List {
let i = bytes
.iter()
.position(|&c| !c.is_ascii_digit())
.unwrap_or_else(|| src.len());
.unwrap_or_else(|| src.len() - 1);
let c = bytes[i];
if !(c == b'.' || c == b')') {
return (false, false);