No performance change switching affiliated_key to using element macro.

This commit is contained in:
Tom Alexander
2023-10-16 15:57:18 -04:00
parent 72b4cf8e71
commit f10efec21d
2 changed files with 12 additions and 5 deletions

View File

@@ -35,6 +35,11 @@ macro_rules! element {
return Ok((remaining, ele));
}
};
($parser:expr, $input: expr) => {
if let Ok((remaining, ele)) = $parser($input) {
return Ok((remaining, ele));
}
};
}
pub(crate) use element;