Skip to content

How to match AxisId? #230

@swiftcoder

Description

@swiftcoder

I'm having trouble matching the AxisId struct, in order to process DeviceEvents. Is there something I'm missing here, or are these tuple-structs impossible to check for equality?

error: numeric fields in struct patterns are unstable (see issue #35626)
  --> src/main.rs:68:40
   |
68 |                         glutin::AxisId{0: 0} => app.yaw(value),
   |                                        ^^^^
error[E0532]: expected tuple struct/variant, found struct `glutin::AxisId`
  --> src/main.rs:68:25
   |
68 |                         glutin::AxisId(0) => app.yaw(value),
   |                         ^^^^^^^^^^^^^^ did you mean `glutin::AxisId { /* fields */ }`?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions