Skip to content

feat: Allow trailing comma in callback_labels. #325

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 24, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/bevy_mod_scripting_core/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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: "]
Expand All @@ -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
Expand Down
Loading