Skip to content

devlog mistake #1359

@yzjsswk

Description

@yzjsswk

on https://godot-rust.github.io/dev/september-2025-update/, Ergonomics and developer experience - Class dispatching part, the example code can't work:

let simple_dispatch: i32 = match_class!(event, {
    button @ InputEventMouseButton => 1,
    motion @ InputEventMouseMotion => 2,
    action @ InputEventAction => 3,
    _ => 0,  // Fallback.
});

It seems that it should be:

let simple_dispatch: i32 = match_class! { event,
    button @ InputEventMouseButton => 1,
    motion @ InputEventMouseMotion => 2,
    action @ InputEventAction => 3,
    _ => 0,  // Fallback.
};

according to the source code comments

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions