Indra-db / Flecs-Rust

Rust API for Flecs: A Fast and Flexible Entity Component System (ECS)
MIT License
194 stars 11 forks source link

feat(flecs_ecs_derive): Add support for trailing comma in macros #96

Closed andrewgazelka closed 5 months ago

andrewgazelka commented 5 months ago

Before only syntax like

    observer!(
        "pose_update",
        world,
        event::PostureUpdate,
        &Compose($),
        [filter] &NetworkStreamRef
    )

was allowed. However, now

    observer!(
        "pose_update",
        world,
        event::PostureUpdate,
        &Compose($),
        [filter] &NetworkStreamRef,
    )

is allowed too. Note the trailing comma. Having a trailing comma is often idiomatic (at least, in my opinion) in Rust for multi-line macros.