refactor: utils macros

This commit is contained in:
PoiScript 2019-01-14 14:10:12 +08:00
parent 93ed18602a
commit 75362bd2a8
16 changed files with 70 additions and 91 deletions

View file

@ -13,7 +13,7 @@ impl<'a> Snippet<'a> {
starts_with!(src, "@@");
}
let name = until_while!(src, 2, b':', |c: u8| c.is_ascii_alphanumeric() || c == b'-');
let name = until_while!(src, 2, b':', |c: u8| c.is_ascii_alphanumeric() || c == b'-')?;
if name == 2 {
return None;