From a4c96231feb1188f6a0e33efa5d4480e27315b26 Mon Sep 17 00:00:00 2001 From: Ben Frankel Date: Sun, 28 Jun 2020 14:23:23 -0700 Subject: [PATCH] [rs] Allow trailing comma in vertex_attr_array! --- wgpu/src/macros.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wgpu/src/macros.rs b/wgpu/src/macros.rs index 3cf649ed1a..17bb4e8fd2 100644 --- a/wgpu/src/macros.rs +++ b/wgpu/src/macros.rs @@ -12,7 +12,7 @@ /// Offsets are calculated automatically. #[macro_export] macro_rules! vertex_attr_array { - ($($loc:expr => $fmt:ident),*) => { + ($($loc:expr => $fmt:ident),* $(,)?) => { $crate::vertex_attr_array!([] ; 0; $($loc => $fmt ,)*) }; ([$($t:expr,)*] ; $off:expr ;) => { [$($t,)*] };