Skip to content

Commit 8c1dd28

Browse files
committed
ascii_case_insensitive_phf_map: accept k/v pairs without a trailing comma
1 parent 6ffb7eb commit 8c1dd28

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/macros.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ macro_rules! match_ignore_ascii_case {
7878
/// }
7979
#[macro_export]
8080
macro_rules! ascii_case_insensitive_phf_map {
81+
($name: ident -> $ValueType: ty = { $( $key: expr => $value: expr ),* }) => {
82+
ascii_case_insensitive_phf_map!($name -> $ValueType = { $( $key => $value, )* })
83+
};
8184
($name: ident -> $ValueType: ty = { $( $key: expr => $value: expr, )* }) => {
8285
fn $name(input: &str) -> Option<&'static $ValueType> {
8386
cssparser_internal__invoke_proc_macro! {

0 commit comments

Comments
 (0)