From eecd37ef6ae16b27ac14ad6126e0bac9ccb2bc8d Mon Sep 17 00:00:00 2001 From: Shane Celis Date: Mon, 24 Feb 2025 02:54:06 -0500 Subject: [PATCH] feature: Allow trailing comma in callback_labels. --- crates/bevy_mod_scripting_core/src/event.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/bevy_mod_scripting_core/src/event.rs b/crates/bevy_mod_scripting_core/src/event.rs index 5b29554eb8..4e74ed7bcc 100644 --- a/crates/bevy_mod_scripting_core/src/event.rs +++ b/crates/bevy_mod_scripting_core/src/event.rs @@ -57,7 +57,7 @@ impl CallbackLabel { #[macro_export] /// Creates a set of callback labels macro_rules! callback_labels { - ($($name:ident => $label:expr),*) => { + ($($name:ident => $label:expr),* $(,)?) => { $( #[doc = "A callback label for the event: "] @@ -74,7 +74,7 @@ macro_rules! callback_labels { callback_labels!( OnScriptLoaded => "on_script_loaded", - OnScriptUnloaded => "on_script_unloaded" + OnScriptUnloaded => "on_script_unloaded", ); /// A trait for types that can be converted into a callback label